A z-score
A z-score, in simple terms, is a score that expresses the value of a distribution in standard deviation with respect to the mean. Let's take a look at the following formula that calculates the z-score:
Here, X is the value in the distribution, µ is the mean of the distribution, and σ is the standard deviation of the distribution
Let's try to understand this concept from the perspective of a school classroom.
A classroom has 60 students in it and they have just got their mathematics examination score. We simulate the score of these 60 students with a normal distribution using the following command:
>>> classscore >>> classscore = np.random.normal(50, ...
Get Mastering Python for Data Science now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.