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, 10, 60).round() [ 56. 52. 60. 65. 39. 49. 41. 51. 48. 52. 47. 41. 60. 54. 41. 46. 37. 50. 50. 55. 47. 53. 38. 42. 42. 57. 40. 45. 35. 39. 67. 56. 35. 45. 47. 52. 48. 53. 53. 50. 61. 60. 57. 53. 56. 68. 43. 35. 45. 42. 33. 43. 49. 54. 45. 54. 48. 55. 56. 30...