FAQ: Variance - Distance From Mean

This community-built FAQ covers the “Distance From Mean” exercise from the lesson “Variance”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Learn Statistics With Python

FAQs on the exercise Distance From Mean

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

1 Like

What is the difference between “np.average()” and “np.mean()”?

1 Like

I recently searched for the same thing and found the following Stack Overflow question:

There seems to be no difference if you simply apply to a list of numbers without giving any optional parameters.

The biggest difference is that np.average() can compute a weighted average, but np.mean() cannot. That is, if you want to find a weighted average, use np.average().

In addition, np.mean() can specify a data type for calculating with dtype, but np.average() cannot.

1 Like

So I came upon this stage and I was entering the actual, numerical results of grade - mean, i.e. 2.2, etc. Kept getting an error message and, as it turns out, it actually wants you to write the formula.


That is difference one = 88 - mean.

Not so much a spoiler as a gotcha, IMO. Hope it helps.