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()Tier 1 · statistics
Z-Score
Standardized z-score z=(x-mu)/sigma.
Files (1)
How to use it
Computes the standardized z-score z = (x − μ) / σ.
Launch ZSCORE from prgm, choose 1:Z, then:
x:— the raw data value.mu:— population mean μ.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?
- Run
ZSCORE, choose1:Z. x:→ 85,mu:→ 75,sd:→ 5.- 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)
| ID | Inputs | Expected contains |
|---|---|---|
| x85-mu75-sd5 | 1, 85, 75, 5, 0 | z=2.0 |
| x50-mu60-sd10 | 1, 50, 60, 10, 0 | z=-1.0 |