The standard deviation and the variance
As mentioned in the video, the standard deviation is the square root of the variance. You will see this for yourself by computing the standard deviation using np.std() and comparing it to what you get by computing the variance with np.var() and then computing the square root.
Toto cvičení je součástí kurzu
Statistical Thinking in Python (Part 1)
Pokyny k cvičení
- Compute the variance of the data in the
versicolor_petal_lengtharray usingnp.var()and store it in a variable calledvariance. - Print the square root of this value.
- Print the standard deviation of the data in the
versicolor_petal_lengtharray usingnp.std().
Interaktivní cvičení na vyzkoušení si v praxi
Vyzkoušejte si toto cvičení dokončením tohoto ukázkového kódu.
# Compute the variance: variance
# Print the square root of the variance
# Print the standard deviation