Practical 1
Practical 1
Practical 1
PRACTICAL 1
Perform descriptive analytics of the given data. The cumulative grade point average (CGPA) of students are given in the dataset.
(A) Calculate the mean, median and mode and the standard deviation
import pandas as pd
import numpy as np
import scipy as sc
import matplotlib.pyplot as plt
import seaborn as sea
import statistics as st
import sklearn
df = pd.read_csv('/content/data (1).csv')
df.head(10)
1st 2nd 3rd 4th 5th College Code Gender Roll Roll no. Subject Code
Mean: 7.038863636363637
Median: 7.07
Mode: 7.33
print("Q1:", q1)
print("Q3:", q3)
print("IQR:", iqr)
Q1: 6.44
Q3: 7.59
IQR: 1.1499999999999995
(D)The Dean of the school believes that the CGPA is a right tailed distribution. Is there an evidence to supportdean‘s belief?
mm=sea.distplot(aa)
print('Data is left skewed')
<ipython-input-37-af1a1c56c674>:1: UserWarning:
Please adapt your code to use either `displot` (a figure-level function with
similar flexibility) or `histplot` (an axes-level function for histograms).
For a guide to updating your code to use the new functions, please see
https://gist.github.com/mwaskom/de44147ed2974457ad6372750bbe5751
mm=sea.distplot(aa)
Data is left skewed
(E) Create a histogram for the data, what should be the ideal number of bins in the histogram.
plt.hist(aa)
plt.show()