Uniform and triangular distributions, and judging a model
What this lesson covers
- Continuous uniform and triangular probabilities are areas of rectangles and triangles.
- A model is judged by comparing its probabilities with the data's relative frequencies.
Models with hard limits
- Some values cannot go below a or above b.
- Uniform and triangular: both in the booklet.
- A probability is an area. Total area 1.
Uniform: a flat pdf
- Every wait from 0 to 12 equally likely.
- Height 1/(b − a) = 1/12.
- More than 8 minutes: a rectangle.

Try it: a flat model
The working, and the assumption
- Width × height.
- Assumes a random arrival.
- X ~ U(0, 12)
- height = 1/(12 − 0) = 1/12
- P(X > 8) = width × height
- = (12 − 8) × 1/12
- = 4/12 = 1/3 = 0.3333
Triangular: a = 2, c = 4, b = 10
- Lowest 2, most likely 4, highest 10.
- Peak height 0.25 at c = 4.
- Over 8 minutes: a small triangle.

Try it: area under the model
The tail: ½ × base × height
- Peak 2/(b − a).
- Then ½ × base × height.
- a = 2, c = 4, b = 10
- peak = 2/(10 − 2) = 0.25
- f(8) = (10 − 8)/(10 − 4) × 0.25
- = 2/6 × 1/4 = 1/12
- P(X > 8) = ½ × base × height
- = ½ × 2 × 1/12
- = 1/12 = 0.0833
A middle area: 1 minus the tails
- 1 minus both tails.
- The left tail: a triangle.
- f(3) = (3 − 2)/(4 − 2) × 0.25
- = 1/2 × 0.25 = 0.125
- P(X < 3) = ½ × 1 × 0.125
- = 0.0625
- P(X > 8) = 0.0833from before
- P(3 < X < 8) = 1 − 0.0625 − 0.0833
- = 0.8542
Probability calculator
Choosing a, b and c
- A and b: the plausible limits.
- c: the most likely value, the peak.
- Nothing more likely? Uniform.
| Parameter | Choose it as |
|---|---|
| a | lowest plausible value |
| b | highest plausible value |
| c | most likely value |
| Uniform | no value more likely |
The model against 80 orders
- No order under 2 or over 10 minutes.
- Tallest bar: 4 to 5 minutes.
- Judge it with numbers, not by eye.

Relative frequency against the model
- Count ÷ total.
- Then compare.
- X > 8: 8/80 = 0.1model 0.0833
- X < 3: 4/80 = 0.05model 0.0625
- 4 to 5: 19/80 = 0.2375
- model f(5) = 5/6 × 0.25 = 5/24
- model: ½(1/4 + 5/24) × 1 = 11/48
- = 0.2292data 0.2375
Common slips with triangles
- Triangle peak: 2/(b − a), not 1/(b − a).
- A triangle needs the half.
- A count is not a probability.
| Wrong | Right | |
|---|---|---|
| Triangle height | 1/(b − a) | 2/(b − a) |
| Triangle area | base × height | ½ × base × height |
| From a histogram | 8 orders | 8/80 = 0.1 |
| Model | not named | a = 2, c = 4, b = 10 |
Changing a parameter: b = 11
- Raise b to 11.
- Over 8 jumps past 0.1.
- b = 11: peak = 2/(11 − 2) = 2/9
- f(8) = (11 − 8)/(11 − 4) × 2/9
- = 3/7 × 2/9 = 2/21
- P(X > 8) = ½ × 3 × 2/21 = 1/7
- = 0.1429data 0.1
- f(3) = 1/2 × 2/9 = 1/9
- P(X < 3) = ½ × 1 × 1/9 = 0.0556
Changing a parameter: c = 5
- Or move c to 5.
- Fix one tail, check the rest.
- c = 5: peak = 2/(10 − 2) = 0.25
- f(8) = (10 − 8)/(10 − 5) × 0.25
- = 2/5 × 0.25 = 0.1
- P(X > 8) = ½ × 2 × 0.1 = 0.1matches the data
- f(3) = (3 − 2)/(5 − 2) × 0.25
- = 1/3 × 0.25 = 1/12
- P(X < 3) = ½ × 1 × 1/12 = 0.0417
Try it: judge the model
Where the marks are
- Achieved: sketch, and a probability as an area.
- Merit: justify a, b and c.
- Excellence: judge the fit, and changes.
What to take away
- Sketch it, find the area, then check it against data.
| Uniform height | 1/(b − a) |
| Triangle peak | 2/(b − a) |
| Probability | an area |
| Middle area | 1 − the two tails |
| a, b and c | from data and context |
| Judge a model | relative frequencies |
Common mistakes
- Triangle peak = 1/(b − a) = 1/8The triangle's peak is 2/(b − a) = 2/8 = 0.25, because ½ × base × height must give a total area of 1.
- P(X > 8) = base × height = 2 × 1/12 = 1/6The tail is a triangle, so it needs the half: ½ × 2 × 1/12 = 1/12 = 0.0833.
- The tail height at 8 is the peak, 0.25.The height falls in a straight line from the peak: f(8) = (10 − 8)/(10 − 4) × 0.25 = 1/12.
- 8 orders were over 8 minutes and the model gives 0.0833, so the model is wrong.Turn the count into a relative frequency first: 8/80 = 0.1, then compare 0.1 with the model's 0.0833.
Your turn: eight questions
- Sketch each pdf and mark its height.
- Questions 2 and 3 share a model.
| Given | Find | |
|---|---|---|
| 1 | X ~ U(10, 30) | P(X > 25) |
| 2 | a = 0, c = 6, b = 10 | P(X < 3) |
| 3 | the same model | P(X > 8) |
| 4 | 14 of 100 over 8 | judge Q3 |
| 5 | delivery 20 to 50 min, most often 30 | a, c, b |
| 6 | a = 2, c = 5, b = 12 | peak height |
| 7 | X ~ U(a, 30), P(X > 25) = 0.2 | a |
| 8 | a = 0, c = 4, b = 10 | P(2 < X < 7) |
Show answer
1. Height 1/20; 5 × 1/20 = 0.25. 2. Peak 0.2, height at 3 is 0.1; ½ × 3 × 0.1 = 0.15. 3. Height at 8 is 0.1; ½ × 2 × 0.1 = 0.1. 4. Data 14/100 = 0.14 against the model 0.1: the model is light in the upper tail, so a larger c or b would fit better (c = 7 gives 0.1333). 5. a = 20, c = 30, b = 50: a and b are the lowest and highest plausible times, c the most likely. 6. Peak = 2/(b − a) = 2/(12 − 2) = 0.2, so the triangle has area 1. 7. a = 5. P(X > 25) = (30 − 25)/(30 − a) = 0.2, so 30 − a = 5 ÷ 0.2 = 25. 8. 0.75. Peak 0.2; P(X < 2) = ½ × 2 × 0.1 = 0.1 and P(X > 7) = ½ × 3 × 0.1 = 0.15, so 1 − 0.1 − 0.15 = 0.75.
The answers: questions 1 and 2
- 1. X ~ U(10, 30): height 1/20
- P(X > 25) = (30 − 25) × 1/20
- = 5/20 = 0.25
- 2. a = 0, c = 6, b = 10
- peak = 2/(10 − 0) = 0.2
- f(3) = (3 − 0)/(6 − 0) × 0.2
- = 1/2 × 0.2 = 0.1
- P(X < 3) = ½ × 3 × 0.1 = 0.15
The answers: questions 3 and 4
- a = 0, c = 6, b = 10, peak 0.2
- 3. f(8) = (10 − 8)/(10 − 6) × 0.2
- = 1/2 × 0.2 = 0.1
- P(X > 8) = ½ × 2 × 0.1 = 0.1
- 4. data: 14/100 = 0.14
- 0.14 > 0.1model light in upper tail
- c = 7: f(8) = 2/3 × 0.2 = 0.1333
- P(X > 8) = ½ × 2 × 0.1333 = 0.1333
Sample question: Achieved
The time for a guided kayak trip is modelled by a triangular distribution with minimum 2 hours, most likely 3 hours and maximum 6 hours. Find the probability that a trip takes more than 5 hours.
Hint
The peak height is 2b − a. The tail above 5 is a small triangle: ½ × base × height.
Answer
P(X > 5) = 112 = 0.0833
Step by step
- Define X = trip time in hours, triangular with a = 2, c = 3, b = 6.
- Sketch it: a triangle from 2 to 6 with its peak at 3.
- The total area must be 1. Recall the peak height: 2b − a = 26 − 2 = 0.5.
- More than 5 hours is the right tail: a small triangle from 5 to 6.
- Its height at 5 is a fraction of the peak: 6 − 56 − 3 × 0.5 = 13 × 0.5 = 16.
- Area = ½ × base × height = ½ × 1 × 16 = 112 = 0.0833.
- Classic mistake: using 1b − a for the peak. That is the uniform height, and it makes the triangle's area only ½.
Full working
- X ~ triangular, a = 2, c = 3, b = 6X = trip time, hours
- peak = 26 − 2 = 0.5
- f(5) = 6 − 56 − 3 × 0.5 = 16
- P(X > 5) = ½ × 1 × 16½ × base × height
- P(X > 5) = 112 = 0.0833
Sample questions: Merit
Pizza delivery times are modelled by a triangular distribution with a = 10, c = 16 and b = 30 minutes. Find the probability that a delivery takes between 14 and 25 minutes.
Hint
The middle is awkward, so find the two tail triangles and take them away from 1.
Answer
P(14 < X < 25) = 0.7774
Step by step
- Define X = delivery time in minutes, triangular with a = 10, c = 16, b = 30.
- Peak height = 2b − a = 220 = 0.1.
- The middle area from 14 to 25 contains the peak, so it is not a single shape. Use 1 minus the two tails.
- Left tail, from 10 to 14. Height at 14: 14 − 1016 − 10 × 0.1 = 46 × 0.1 = 115.
- Left area = ½ × 4 × 115 = 215 = 0.1333.
- Right tail, from 25 to 30. Height at 25: 30 − 2530 − 16 × 0.1 = 514 × 0.1 = 128.
- Right area = ½ × 5 × 128 = 556 = 0.0893.
- Middle = 1 − 0.1333 − 0.0893 = 0.7774.
- Classic mistake: using the peak height for a tail. The height at 14 is lower than the peak, because 14 is left of c.
- Check: the tails are short on the left and long but thin on the right, so most of the area is in the middle. 0.7774 fits.
Full working
- peak = 230 − 10 = 0.1
- f(14) = 14 − 1016 − 10 × 0.1 = 115
- P(X < 14) = ½ × 4 × 115 = 0.1333
- f(25) = 30 − 2530 − 16 × 0.1 = 128
- P(X > 25) = ½ × 5 × 128 = 0.0893
- P(14 < X < 25) = 1 − 0.1333 − 0.08931 minus the tails
- P(14 < X < 25) = 0.7774
The time a café takes to make an order is triangular with a = 0, c = 4 and b = 10 minutes. The café wants a time t that only 5% of orders take longer than. Find t, to 2 decimal places.
Hint
Write the right-tail area above t in terms of t, set it equal to 0.05, and solve.
Answer
t = 10 − √3 = 8.27 minutes
Step by step
- Define X = time to make an order in minutes, triangular with a = 0, c = 4, b = 10.
- Peak height = 210 − 0 = 0.2.
- Only 5% take longer, so t is in the right tail, past the peak at 4.
- Height at t: 10 − t10 − 4 × 0.2 = 10 − t30.
- Tail area = ½ × base × height = ½ × (10 − t) × 10 − t30 = (10 − t)²60.
- Set it equal to 0.05: (10 − t)² = 3.
- 10 − t = √3, taking the positive root because t is below 10. So t = 10 − √3 = 8.27 minutes.
- Check: (10 − 8.2679)²60 = 360 = 0.05. Correct.
- Classic mistake: assuming t is halfway along the tail. The area shrinks with the square of the base, not in proportion.
Full working
- peak = 210 = 0.2
- f(t) = 10 − t6 × 0.2 = 10 − t30
- P(X > t) = ½ × (10 − t) × 10 − t30 = (10 − t)²60
- (10 − t)²60 = 0.05, so (10 − t)² = 3
- 10 − t = √3t < 10, take the positive root
- t = 10 − √3 = 8.27 minutes
Sample questions: Excellence
A café models the time to make a coffee as triangular with a = 2, c = 5 and b = 12 minutes. In 120 recorded orders, 22 took more than 9 minutes and 9 took less than 3 minutes. Compare the model with the data. Then test the model with a = 1, c = 5 and b = 13, and say which model fits better.
Hint
Turn the counts into relative frequencies, then find the same tail areas from each model.
Answer
Model 1: P(X > 9) = 0.1286, P(X < 3) = 0.0333 against data 0.1833 and 0.075; both tails too light. Model 2: 0.1667 and 0.0833, much closer, so the wider model fits better
Step by step
- Data first: a count is not a probability. 22120 = 0.1833 took over 9 minutes, and 9120 = 0.075 took under 3 minutes.
- Model 1: a = 2, c = 5, b = 12, peak 210 = 0.2.
- Right tail from 9 to 12: height 12 − 912 − 5 × 0.2 = 37 × 0.2. Area = ½ × 3 × 37 × 0.2 = 970 = 0.1286.
- Left tail from 2 to 3: height 3 − 25 − 2 × 0.2 = 115. Area = ½ × 1 × 115 = 130 = 0.0333.
- Compare: the model gives 0.1286 against 0.1833 for slow orders, and 0.0333 against 0.075 for quick ones. Both tails are too light.
- So the real times are more spread out than the model. That suggests a smaller a and a larger b, keeping the mode at 5.
- Model 2: a = 1, c = 5, b = 13, peak 212 = 16.
- Right tail from 9 to 13: height 48 × 16 = 112. Area = ½ × 4 × 112 = 16 = 0.1667.
- Left tail from 1 to 3: height 24 × 16 = 112. Area = ½ × 2 × 112 = 112 = 0.0833.
- Model 2 gives 0.1667 against 0.1833 and 0.0833 against 0.075. Both are close, so Model 2 fits better.
- Limitation: 120 orders is a modest sample, and we only checked two tails, not the whole shape.
Full working
- data: 22120 = 0.1833 over 9, 9120 = 0.075 under 3relative frequencies
- Model 1: P(X > 9) = ½ × 3 × 37 × 0.2 = 970 = 0.1286
- Model 1: P(X < 3) = ½ × 1 × 115 = 130 = 0.0333
- both tails too light: widen a and b
- Model 2: P(X > 9) = ½ × 4 × 112 = 0.1667
- Model 2: P(X < 3) = ½ × 2 × 112 = 0.0833
- Model 2 (a = 1, c = 5, b = 13) fits better
A variable X has a triangular distribution with a = 0 and b = 20, but the mode c is unknown. P(X < 5) = 0.1, and c is more than 5. Find c. Hence find P(X > 15) and the median of X.
Hint
Write the left-tail area below 5 in terms of c. For the median, first decide whether it is left or right of c.
Answer
c = 12.5; P(X > 15) = 16 = 0.1667; median = √125 = 11.18
Step by step
- Peak height = 2b − a = 220 = 0.1, whatever c is.
- Since c > 5, the region below 5 is a left-tail triangle. Height at 5: 5 − 0c − 0 × 0.1 = 0.5c.
- Area = ½ × 5 × 0.5c = 1.25c. Set it equal to 0.1: c = 12.5. It is more than 5, as required.
- Right tail above 15: height 20 − 1520 − 12.5 × 0.1 = 57.5 × 0.1 = 115.
- P(X > 15) = ½ × 5 × 115 = 16 = 0.1667.
- Median: the value m with half the area below it. First, the area left of the peak is cb = 12.520 = 0.625.
- 0.625 is more than 0.5, so the median is left of the peak, in the rising part.
- Area below m: ½ × m × (m12.5 × 0.1) = m²250. Set m²250 = 0.5, so m² = 125.
- m = √125 = 11.18.
- Classic mistake: assuming the median is the mode, 12.5. The triangle is not symmetric, so they differ.
- Check: 11.18²250 = 125250 = 0.5. Correct.
Full working
- peak = 220 = 0.1
- P(X < 5) = ½ × 5 × 0.5c = 1.25c = 0.1c > 5, so a left-tail triangle
- c = 12.5
- P(X > 15) = ½ × 5 × 115 = 16height at 15 is 115
- P(X < c) = 12.520 = 0.625 > 0.5median left of the peak
- m²250 = 0.5, m = √125
- c = 12.5, P(X > 15) = 0.1667, median = 11.18
Challenge
The time X minutes to unload a truck at a depot is triangular with a = 10, c = 15 and b = 35. The manager looks only at trucks that have already taken longer than 15 minutes. Find the time t by which 90% of those trucks are unloaded. Give t exactly and to 2 decimal places.
Hint
First find P(X > 15). Then 10% of the slow trucks is a fraction of all trucks: that gives the right-tail area above t.
Answer
t = 35 − 2√10 ≈ 28.68 minutes
Step by step
- The peak height is 2 ÷ (35 − 10) = 225.
- P(X > 15) is the whole triangle right of the peak: ½ × 20 × 225 = 0.8.
- We want P(X > t | X > 15) = 0.1. Any truck over t is already over 15, so P(X > t) = 0.1 × 0.8 = 0.08.
- t is right of the peak. The tail above t has base 35 − t and height (35 − t) ÷ 20 × 225, so its area is (35 − t)² ÷ 500.
- (35 − t)² ÷ 500 = 0.08 gives (35 − t)² = 40, so 35 − t = √40 = 2√10, taking the root that keeps t below 35.
- t = 35 − 2√10 ≈ 28.68 minutes. Check: (35 − 28.675)² ÷ 500 = 40 ÷ 500 = 0.08.
Full working
- peak = 2 ÷ (35 − 10) = 225
- P(X > 15) = ½ × 20 × 225 = 0.8right of the peak
- P(X > t) = 0.1 × 0.8 = 0.08over t is already over 15
- P(X > t) = ½ × (35 − t) × 35 − t20 × 225 = (35 − t)²500similar triangles
- (35 − t)² = 40, 35 − t = 2√10
- t = 35 − 2√10 ≈ 28.68 minutes
Two bus routes stop outside Aroha's flat, and either one gets her to work. Route A comes every 12 minutes and Route B every 20 minutes, and the two timetables are not linked. She arrives at a random time and takes the first bus that comes. Her wait for A is U(0, 12) and her wait for B is U(0, 20), independently. Find the probability that she waits more than 8 minutes. Then find her median wait, exactly and to 2 decimal places.
Hint
She waits more than t minutes only if both buses are more than t minutes away. Each of those is a rectangle area, and independence lets you multiply.
Answer
P(wait > 8) = 15 = 0.2; median wait = 16 − 2√34 ≈ 4.34 minutes
Step by step
- Her wait is longer than t exactly when bus A and bus B are both more than t minutes away.
- For A: P(more than t) = (12 − t) × 112. For B: (20 − t) × 120. The waits are independent, so multiply.
- t = 8: (4 ÷ 12) × (12 ÷ 20) = 13 × 35 = 15.
- The median m has P(wait > m) = 0.5, so (12 − m)(20 − m) ÷ 240 = 0.5, which gives m² − 32m + 120 = 0.
- m = 16 ± 2√34. The wait cannot be more than 12 minutes, so m = 16 − 2√34 ≈ 4.34 minutes.
- Check: (12 − 4.338)(20 − 4.338) = 7.662 × 15.662 = 120, and 120 ÷ 240 = 0.5.
Full working
- P(wait > t) = P(A wait > t) × P(B wait > t)first bus, independent
- = 12 − t12 × 20 − t20 = (12 − t)(20 − t)240rectangles
- t = 8: 412 × 1220 = 15
- (12 − m)(20 − m)240 = 0.5, so m² − 32m + 120 = 0median
- m = 16 ± √136 = 16 ± 2√34quadratic formula
- m must be under 12, so m = 16 − 2√34
- P(wait > 8) = 0.2; median wait = 16 − 2√34 ≈ 4.34 minutes
The number of minutes X that a regional bus is late is modelled as triangular with a = 0 and b = 20, but the most likely value c is unknown. Records show that 60% of buses are between 6 and 14 minutes late, and that more buses are under 10 minutes late than over 10 minutes late. Find c exactly, and the probability that a bus is under 10 minutes late.
Hint
First decide where c must be compared with 6 and 14. With c in between, the middle 60% leaves a triangle in each tail. Expect a quadratic with two roots that both look possible; the last fact decides.
Answer
c = 10 − √10 ≈ 6.84 minutes; P(X < 10) ≈ 0.6201
Step by step
- The peak height is 2 ÷ 20 = 0.1 whatever c is. If c were 6 or less, the region from 6 to 14 would sit on the falling side and its area would be 8 ÷ (20 − c); setting that to 0.6 gives c = 6.67, which is not 6 or less. In the same way c cannot be 14 or more. So 6 < c < 14.
- Left tail below 6: ½ × 6 × (6 ÷ c) × 0.1 = 1.8 ÷ c. Right tail above 14: ½ × 6 × (6 ÷ (20 − c)) × 0.1 = 1.8 ÷ (20 − c).
- The tails add to 0.4, and 1.8 ÷ c + 1.8 ÷ (20 − c) = 36 ÷ (c(20 − c)). So c(20 − c) = 90, giving c² − 20c + 90 = 0 and c = 10 ± √10.
- Both roots, 6.84 and 13.16, lie between 6 and 14, so the 60% fact alone cannot decide. They are mirror images about 10.
- With c = 10 + √10 the peak is past 10 and P(X < 10) = 100 ÷ (20c) = 0.38, under a half. With c = 10 − √10, P(X < 10) = 1 − 100 ÷ (20(20 − c)) = 0.62, over a half.
- More buses are under 10 minutes late, so c = 10 − √10 ≈ 6.84 and P(X < 10) ≈ 0.6201.
Full working
- peak = 2 ÷ 20 = 0.1any c
- c ≤ 6: P(6 < X < 14) = 820 − c = 0.6 gives c = 6.67, a contradictionsame for c ≥ 14
- P(X < 6) = 1.8c, P(X > 14) = 1.820 − ctail triangles
- 1.8c + 1.820 − c = 36c(20 − c) = 0.4
- c(20 − c) = 90, c² − 20c + 90 = 0, c = 10 ± √10
- c = 10 + √10: P(X < 10) = 10020c = 0.3799 < 0.5rejected
- c = 10 − √10: P(X < 10) = 1 − 10020(20 − c) = 0.6201 > 0.5
- c = 10 − √10 ≈ 6.84 minutes; P(X < 10) ≈ 0.6201
Practise this
Report a mistake
More in AS 91586
Choosing a distribution, and naming it every time7 min
Discrete random variables: mean and standard deviation9 min
Binomial and Poisson: at least, at most, and the rate10 min
The normal distribution: forwards, backwards and conditional11 min
Uniform and triangular distributions, and judging a model10 min
Choosing a distribution: 7 exam questions solved step by step10 min
Discrete random variables: 7 exam questions solved step by step11 min
Binomial and Poisson: 7 exam questions solved step by step10 min
Normal distribution: 7 exam questions solved step by step10 min
Uniform and triangular: 7 exam questions solved step by step10 minIs your child on track?
Take the free placement test