1. The Calculate the variance of a certain set of data:
Pts_mean = SUM (nba_stats["pts"])/len (nba_stats[' pts ')
point_variance = 0
For I in nba_stats[' pts ']:
difference = (i-pts_mean) * * 2
Point_variance + = Difference
Point_variance = Point_variance/len (nba_stats[' pts ')
2. Something to the power have the highest pirority, then mutiply and Devide, the Add and subsract.
3. Raise to the 11
fifth
power. Assign the result to e
. ( 11**5)
Take the fourth
root of 10000
. (10000** (1/4))
4. Use STD () method to get the diviation:
Std_dev = nba_stats["PF"].std ()
5. To get the normal distribution:
From scipy.stats import norm
Points_two = Np.arange ( -10,10,0.1) #setup The X value by distributing-points from-10 to evenly.
Probabilities_two = Norm.pdf (points_two,0,2) # Get the normal distribution by using norm function
Plt.plot (Points,probabilities_two) # Plot the points
Plt.show ()
6. In the normal distribution:
68% of the data is within 1 standard deviation of the mean, about 95% was within 2 standard deviations of the mean, and ABO UT 99% is within 3 standard deviations of the mean
7.
Statistics and Linear Algebra 2