Statistics & Probability — Intermediate
LEVEL 5 — Mastery Paper (Cross-domain: Math + Physics + Coding)
Time limit: 75 minutes
Total marks: 60
Instructions: Answer all three questions. Show all reasoning. Proofs must be rigorous; code must be complete and runnable (Python 3, pseudocode acceptable only where stated). Use for mathematics.
Question 1 — Bayes, Detectors, and the Physics of False Positives (20 marks)
A particle physics experiment uses a scintillation detector to flag candidate "signal" events against a "background" of noise. In a given run:
- The true fraction of signal events among all events is .
- The detector fires ("D") with probability on a genuine signal (efficiency).
- The detector fires on background with probability (false-alarm rate).
(a) Starting from the definition of conditional probability, derive Bayes' theorem in the form State clearly which axiom / law of total probability you use. (4)
(b) Compute numerically to 3 significant figures. Interpret physically why the "purity" of a flagged sample is so low despite high efficiency. (4)
(c) The team runs a second independent detector with the same characteristics. Assuming the two detectors' firings are conditionally independent given the event type, compute the posterior when both fire. State precisely the independence assumption used and where it enters. (5)
(d) Write a short Python function posterior(prior, eff, far, n_fires) that returns for identical detectors, and use it to find the smallest giving posterior . Show the recurrence/logic and the final . (7)
Question 2 — Binomial Distribution: Radioactive Counting & Estimation (22 marks)
A radioactive sample is monitored. In each fixed 1-second window the probability that a decay is registered by a Geiger counter is modelled as a Bernoulli trial with success probability . Over independent windows let be the number of registered decays, so .
(a) From the binomial PMF , prove that using the identity . (5)
(b) Prove that . You may use ; derive that intermediate result. (6)
(c) For , : compute , , and the exact probability . Give to 4 significant figures. (5)
(d) An experimenter observes decays in windows and uses the estimator . Show is unbiased, give its standard error in terms of , and evaluate the numerical standard error using as a plug-in. Comment on how the physicist would report the count rate. (6)
Question 3 — Grouped Data, Dispersion & a Combinatorial Proof (18 marks)
The energies (keV) of 60 detected photons are grouped:
| Energy (keV) | Frequency |
|---|---|
| 6 | |
| 14 | |
| 20 | |
| 12 | |
| 8 |
(a) Estimate the mean and median (grouped, using the standard interpolation formula), showing the cumulative-frequency working. (6)
(b) Estimate the standard deviation using midpoints (assumed-mean or direct method). Give it to 3 significant figures. (5)
(c) Determine and (grouped interpolation) and hence the interquartile range. Sketch (describe) the box-and-whisker plot and comment on skew. (4)
(d) Prove the Pascal identity combinatorially (not algebraically), and state how it generates one row of Pascal's triangle from the previous. (3)
Answer keyMark scheme & solutions
Question 1
(a) Derivation. (4)
By definition of conditional probability (from Kolmogorov axioms, with ): By the law of total probability, since partition the sample space (): Substituting:
(b) (4) With :
- Numerator . (1)
- Denominator . (1)
- (3 s.f.). (1)
Interpretation: Signals are extremely rare (), so even a small false-alarm rate () applied to the vast background produces far more false firings () than true firings (). High efficiency cannot overcome a low base rate — purity is dominated by the prior. (1)
(c) (5) Conditional independence assumption: given the event type ( or ), and are independent, so (2, for stating & using assumption)
Bayes again: (2) Denominator ; ratio . (1) (Coincidence requirement dramatically raises purity from 3% to ~52%.)
(d) (7) Logic: for identical conditionally-independent detectors all firing,
def posterior(prior, eff, far, n_fires):
like_s = eff**n_fires * prior
like_b = far**n_fires * (1 - prior)
return like_s / (like_s + like_b)
n = 1
while posterior(0.001, 0.98, 0.03, n) < 0.99:
n += 1
print(n, posterior(0.001, 0.98, 0.03, n))Checking:
- : ;
- : like_s , like_b ; posterior .
- : like_b , like_s ; posterior . ✓
Smallest . (Marks: function 3, recurrence logic 2, correct with working 2.)
Question 2
(a) (5) term vanishes. Use (1): Let : (2)
(b) (6) Compute . Using (2): Then . (1)
(c) (5) :
- . (1)
- . (1)
- :
- :
- :
- :
- Sum (4 s.f.). (3)
(d) (6) ⇒ unbiased. (2) , so SE . (2) Plug-in : SE . (1) Report: count rate decays per window (i.e. state estimate with its standard error / confidence interval, noting the large relative uncertainty from small ). (1)
Question 3
(a) (6) Midpoints: 10,30,50,70,90; : 6,14,20,12,8; . . Mean keV. (2)
Cumulative freq: 6, 20, 40, 52, 60. ⇒ median class (, , , ). (2)
(b) (5) . Variance . (3) SD keV (3 s.f.). (2)
(c) (4) : position → class (): keV. (1.5) : position → class (): keV. (1.5) keV. Box from 32.86 to 68.33, median line at 50 (≈ centred, slightly left), whiskers to 0 and 100. Since median () is near the box centre and mean ()≈median, distribution is nearly symmetric with very slight right skew. (1)
(d) (3) Combinatorial proof: counts -subsets of an -set. Fix element . Every -subset either contains — choose the remaining from the other elements: ways — or excludes — choose all from the other : ways. These cases are disjoint and exhaustive, so by the addition rule . (2) This is exactly the rule that each entry in a Pascal-triangle row equals the sum of the two entries above it in the previous row, generating row from row . (1)
[
{"claim":"Q1b single-detector posterior ~0.0317",
"code":"num=Rational(98,100)*Rational(1,1000); den=num+Rational(3,100)*Rational(999,1000); val=float(num/den); result = abs(val-0.0317)<0.001"},
{"claim":"Q1d smallest n with posterior>=0.99 is 4",
"code":"def post(n):\n ls=(0.98**n)*0.001; lb=(0.03**n)*0.999; return ls/(ls+lb)\nn=1\nwhile post(n)<0.99:\n n+=1\nresult = (n==4)"},
{"claim":"Q2c P(X<=2)=0.4049 for Bin(20,0.15)",
"code":"p=Rational(15,100); tot=sum(binomial(20,k)*p**k*(1-p)**(20-k) for k in range(3)); result = abs(float(tot)-0.4049)<0.0005"},
{"claim":"Q3 mean=50.667, median=50, SD~23.4",
"code":"import math\nf=[6,14,20,12,8]; x=[10,30,50,70,90]; N=sum(f)\nmean=sum(fi*xi for fi,xi in zip(f,x))/N\nvar=sum(fi*xi*xi for fi,xi in zip(f,x))/N-mean**2\nsd=math.sqrt(var)\nresult = abs(mean-50.667)<0.01 and abs(sd-23.37)<0.1"}
]