Get startedGet started for free

Calculating array stats

Not only can you perform elementwise calculations on NumPy arrays, you can also calculate summary stats such as mean and standard deviation of arrays using functions from NumPy.

numpy is imported as np and the array prices (from the previous exercise) is available in your workspace.

This exercise is part of the course

Introduction to Python for Finance

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Calculate the mean 
prices_mean = np.____(____)
print(prices_mean)
Edit and Run Code