Statistics and probability
ASP written lesson, 9 min read, and a 5:56 video lesson. ASP Domain 1: Mathematical Calculations
Narrated by an AI voice. The script is written with AI help from the rules it covers, then fact-checked against them.
Watch the 5:56 video with a pass
The written lesson below is free to read. The video lesson, with captions, chapters and the full transcript, comes with every ASP pass, along with the full question bank, timed mocks, the AI tutor and a study plan to your exam date. $80 per exam for 6 months, or $143 for the ASP and CSP together for 24 months.
Compute a mean, median and sample standard deviation, see why outliers distort the mean, and find AND/OR gate probabilities for independent events, the ASP exam math.
Written lesson
Free to read, 9 min read. Print view
Written with AI help from the rules it covers, then fact-checked against them. Study aid, not site-specific safety advice. The official rule controls.
What you'll learn
- Compute the mean and median of a small data set
- Calculate a sample standard deviation step by step
- Explain why outliers distort the mean but not the median
- Calculate AND and OR gate probabilities for independent events
- Choose the right gate and the right measure of location for a question
Mean and median: two kinds of typical
Many safety reports boil a data set down to one number, such as a typical number of near misses per day. Statisticians call this a location measure: a central value that best describes the data. The two you must be able to compute are the mean and the median (NIST/SEMATECH e-Handbook, Measures of Location; NIST = National Institute of Standards and Technology).
Definition: mean
The mean is the sum of the data points divided by the number of data points. It is the value most commonly called the average.
NIST/SEMATECH e-Handbook, 1.3.5.1
Ȳ = (Y₁ + Y₂ + ... + Y_N) ÷ N
- Ȳ
- the mean of the data
- Yᵢ
- each individual data point
- N
- the number of data points
NIST/SEMATECH e-Handbook, 1.3.5.1
Definition: median
The median is the value of the point that has half the data smaller than it and half the data larger than it.
NIST/SEMATECH e-Handbook, 1.3.5.1
Tip: when a question says "average" it means the mean. When it says "typical value" it may mean either, so check the data for extreme values before choosing.
Finding the median of sorted data
The median depends on position, so the first step is always to sort the data from smallest to largest. Then the rule depends on whether you have an odd or an even number of values (NIST/SEMATECH e-Handbook, Measures of Location).
| Sample size | Median |
|---|---|
| N is odd | The value at position (N + 1) ÷ 2 |
| N is even | The average of the values at positions N ÷ 2 and (N ÷ 2) + 1 |
For five sorted values, N is odd and the median is at position (5 + 1) ÷ 2 = 3, the third value. For six sorted values, you average the third and fourth values, so the median may be a number that is not in the data set.
Tip: a very common error is taking the middle value of unsorted data. Sort first, every time.
Variance and sample standard deviation
The mean tells you where the data sit. A measure of spread tells you how widely the values scatter around that center. The most common spread measures are the variance and the standard deviation (NIST/SEMATECH e-Handbook, Measures of Scale).
Key rule
The sample variance is the sum of the squared distances from the mean, divided by N minus 1. The standard deviation is the square root of the variance.
NIST/SEMATECH e-Handbook, 1.3.5.6
s² = Σ(Yᵢ − Ȳ)² ÷ (N − 1)
s = √s²
- s²
- sample variance
- s
- sample standard deviation
- Yᵢ
- each data point
- Ȳ
- the mean of the data
- N
- the number of data points
NIST/SEMATECH e-Handbook, 1.3.5.6
Why take the square root at the end? The variance squares the units of the data, so the variance of counts is in "counts squared". The standard deviation restores the spread to the original data units (NIST/SEMATECH e-Handbook, Measures of Scale).
Steps for a sample standard deviation:
- Find the mean of the data.
- Subtract the mean from each value and square each difference.
- Add the squared differences.
- Divide the sum by N − 1 to get the variance.
- Take the square root of the variance.
Extreme values distort the mean, not the median
An outlier is an extreme value far from the rest of the data. Because the mean uses every value's size, an outlier drags it toward the tail. The median uses only rank order, so the size of an extreme value does not distort it (NIST/SEMATECH e-Handbook, Measures of Location).
Key rule
Extreme values in the tails distort the mean but do not distort the median, since the median is based on ranks. For data with extreme tail values, the median provides a better estimate of location than the mean.
NIST/SEMATECH e-Handbook, 1.3.5.1
The mean is pulled in the direction of the skewness, meaning toward the heavier tail. By contrast, for a normal distribution the mean, median and mode are equivalent, so the choice matters little there (NIST/SEMATECH e-Handbook, Measures of Location).
Spread measures have the same weakness. Squaring distances gives greater weight to values further from the mean, so one far-off point can inflate the variance and standard deviation a great deal (NIST/SEMATECH e-Handbook, Measures of Scale).
Tip: if a question includes a value far larger or smaller than the rest and asks which measure best describes a typical value, the median is generally the better choice, because extreme tail values distort the mean but not the median.
AND and OR gates for independent events
A fault tree combines the probabilities of basic events using logic gates. This lesson assumes the events A and B are independent, meaning one occurring does not change the probability of the other. Q is the output event of the gate (Fault Tree Handbook, U.S. NRC, Chapter VII; NRC = Nuclear Regulatory Commission).
| Gate | Output happens when | Probability of Q |
|---|---|---|
| AND | Both A and B occur | P(A) × P(B) |
| OR | Either A or B (or both) occurs | P(A) + P(B) − P(A) × P(B) |
P(Q) = P(A) × P(B)
- P(Q)
- probability of the gate output
- P(A), P(B)
- probabilities of the two input events
NUREG-0492, Ch. VII
P(Q) = P(A) + P(B) − P(A) × P(B)
- P(Q)
- probability of the gate output
- P(A), P(B)
- probabilities of the two input events
NUREG-0492, Ch. VII
The subtracted term in the OR formula removes the double count of the case where both events occur. Read the question carefully: "both must fail" is an AND gate, and "either can fail" is an OR gate. Because probabilities are between 0 and 1, the AND result is never larger than the OR result.
Worked examples
Example 1: Mean, median and sample standard deviation of five days of near misses
- Daily near-miss counts
- 2, 4, 4, 5, 10
- N
- 5
- Sum = 2 + 4 + 4 + 5 + 10 = 25
- Mean = 25 ÷ 5 = 5
- Sorted data: 2, 4, 4, 5, 10. N = 5 is odd, so the median is at position (5 + 1) ÷ 2 = 3: median = 4
- Squared distances from 5: (2−5)² = 9; (4−5)² = 1; (4−5)² = 1; (5−5)² = 0; (10−5)² = 25
- Sum of squares = 9 + 1 + 1 + 0 + 25 = 36
- Variance = 36 ÷ (N − 1) = 36 ÷ 4 = 9
- Sample standard deviation = √9 = 3
Answer: Mean 5, median 4, sample standard deviation 3 near misses per day
The mean is above the median because the 10 pulls it toward the upper tail.
Example 2: One outlier moves the mean but not the median
- Daily near-miss counts
- 2, 4, 4, 5, 50
- Note
- The last value was 10 in the first example; here a data-entry error makes it 50
- Sum = 2 + 4 + 4 + 5 + 50 = 65
- Mean = 65 ÷ 5 = 13
- Sorted data: 2, 4, 4, 5, 50. The middle (third) value is 4: median = 4
- Compare: the mean moved from 5 to 13, while the median stayed at 4
Answer: Mean 13, median 4
The mean of 13 sits above every value except the outlier, so it is no longer a typical day. The median still describes a normal day.
Example 3: A guard failure and an interlock failure
- P(guard fails)
- 0.1
- P(interlock fails)
- 0.2
- Assumption
- The two failures are independent
- AND gate (both fail): P = 0.1 × 0.2 = 0.02
- OR gate (either fails): P = 0.1 + 0.2 − (0.1 × 0.2)
- OR gate: P = 0.1 + 0.2 − 0.02 = 0.28
Answer: AND = 0.02; OR = 0.28
Both failing together is far rarer than either one failing, so the AND result is the smaller number.
Example 4: Practice problem: two independent failures, 0.1 and 0.3
- P(A)
- 0.1
- P(B)
- 0.3
- Question
- Find the OR gate output
- Product term: P(A) × P(B) = 0.1 × 0.3 = 0.03
- OR gate: P = P(A) + P(B) − P(A)P(B)
- OR gate: P = 0.1 + 0.3 − 0.03 = 0.37
Answer: 0.37
A common wrong answer is 0.4, which adds the probabilities and forgets to subtract the product term.
On the job
Reading a plant's near-miss report
You are the safety manager at a stamping plant. The daily near-miss counts for the week read 2, 4, 4, 5 and 50. The mean is 13, but that overstates a normal day because the single 50 drags it upward (NIST/SEMATECH e-Handbook, Measures of Location).
Before reporting, you check the 50. If it is a data-entry error, you correct it. If it is a genuine one-off event, you do not let it define the week: you report the median of 4 as the typical day, because the median is based on ranks and is not distorted by the extreme value, and you note the 50 separately.
Next, a press needs a guard and an interlock to fail together to injure an operator. Assuming independent failures at 0.1 and 0.2, an AND gate gives 0.1 × 0.2 = 0.02 (Fault Tree Handbook, U.S. NRC, Chapter VII). You would still treat the independence assumption as something to verify, since a shared cause could break it.
Common exam traps
Trap: "Outliers affect the mean and median equally."
What the source says: Extreme values distort the mean; the median is based on ranks and is not distorted (NIST/SEMATECH e-Handbook, Measures of Location).
Trap: "Find the median without sorting first."
What the source says: The median is defined on data sorted from smallest to largest; take the middle value, or average the two middle values when N is even (NIST/SEMATECH e-Handbook, Measures of Location).
Trap: "Sample variance divides by N."
What the source says: Sample variance divides the sum of squared distances from the mean by N − 1 (NIST/SEMATECH e-Handbook, Measures of Scale).
Trap: "The standard deviation is the variance."
What the source says: The standard deviation is the square root of the variance, which restores the original units (NIST/SEMATECH e-Handbook, Measures of Scale).
Trap: "An AND gate adds the probabilities."
What the source says: For independent events, AND multiplies: P(A) × P(B). OR adds, then subtracts P(A) × P(B) (Fault Tree Handbook, U.S. NRC, Chapter VII).
Quick review
- Mean = sum of the data points ÷ number of data points; the median has half the data smaller and half larger (NIST, Measures of Location).
- Sort first: odd N takes the value at (N + 1) ÷ 2; even N averages the values at N ÷ 2 and (N ÷ 2) + 1 (NIST, Measures of Location).
- Sample variance = Σ(Yᵢ − Ȳ)² ÷ (N − 1); standard deviation = √variance, in the original units (NIST, Measures of Scale).
- Extreme tail values distort the mean, not the median, so the median is the better typical value then (NIST, Measures of Location).
- Independent events: AND = P(A)P(B); OR = P(A) + P(B) − P(A)P(B) (Fault Tree Handbook, Chapter VII).
Primary sources
- NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.5.1 Measures of Location and 1.3.5.6 Measures of Scale
- NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.5.1 Measures of Location
- NUREG-0492, Fault Tree Handbook (U.S. NRC, 1981), Chapter VII
- NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.5.1
- NIST/SEMATECH e-Handbook of Statistical Methods, 1.3.5.6
Every rule and number above is checked against these sources before the lesson is published.
Regulations and terms behind this lesson
Terms
- Fault tree analysisA top-down method that starts from one undesired event and maps every credible combination of failures that could cause it.
More ASP lessons
Economic analysis for safety decisionsASP lesson, 6:04Setting up an economic analysis: alternatives, incremental and sunk costs, present value factors, choosing the discount rate under OMB A-94, NPV vs. BCR, cost per injury avoided, sensitivity and break-even, budgeting and procurement.
Exposure assessment and storage capacityASP lesson, 6:12Compute an 8-hour TWA from sampling periods, check a mixture's Em against unity, and size secondary containment at 10% of total volume or the largest container, whichever is greater.
Fall distance and clearance calculationsASP lesson, 5:53Work the ASP fall clearance math: the 6-foot free fall limit, 3.5-foot deceleration distance, arresting force limits, and how to add up the clearance needed below the anchorage.
Take the free ASP diagnostic
25 or 50 questions, free, no card. You get a readiness score for each ASP domain.
Keep going in your ASP course
ASP®, CSP®, CHST® and SMP® are registered marks of the Board of Certified Safety Professionals (BCSP). PassCited is not affiliated with or endorsed by BCSP.