← Library
Tier 1 · statistics

Z-Score

Standardized z-score z=(x-mu)/sigma.

Files (1)
ZSCORE.py264 bytes
def p(s):print(s)
def o1():
 p("=Z-SCORE=")
 x=float(input("x:"))
 m=float(input("mu:"))
 s=float(input("sd:"))
 z=(x-m)/s
 p("z="+str(z))
def menu():
 while True:
  p("=ZSCORE=")
  p("1:Z")
  p("0:EXIT")
  c=input("?>")
  if c=="1":o1()
  elif c=="0":break
menu()
How to use it

Computes the standardized z-score z = (x − μ) / σ.

Launch ZSCORE from prgm, choose 1:Z, then:

  1. x: — the raw data value.
  2. mu: — population mean μ.
  3. sd: — population standard deviation σ (NOT sample SD; use that only if σ is unknown and you have large n).

Output is z=. Positive means above the mean; negative means below.

Example problem

You scored 85 on an exam where the class mean was 75 with a standard deviation of 5. How many SDs above average did you score?

  1. Run ZSCORE, choose 1:Z.
  2. x:85, mu:75, sd:5.
  3. Output: z=2.0.

You scored exactly 2 standard deviations above the mean. Using a z-table, that's roughly the 97.7th percentile. ✓

TI-84 Plus CE — try before committingoff
TI-84 Plus CE



  (calculator off)

  Press ON to start.
Test cases (2)
IDInputsExpected contains
x85-mu75-sd51, 85, 75, 5, 0z=2.0
x50-mu60-sd101, 50, 60, 10, 0z=-1.0