Calculate the standard deviation of an array using NumPy

In this python numpy program, we will calculate the standard deviation of an array using NumPy.

Steps to solve the program
  1. Import the numpy library as np.
  2. Create an array using np.array().
  3. Calculate the standard deviation of the array using np.std().
  4. Print the output.
				
					import numpy as np
age = np.array([20,25,21,23,26,27,26,30,24,26]) 

print("Standard Deviation: ",np.std(age))
				
			

Output :

				
					Standard Deviation:  2.7856776554368237
				
			

calculate the sin angle of an array.

calculate the variance of an array.

Leave a Comment