Statistics workshop

Probability exercises

Density, distributions and joint probabilities. Three original exercises to review the workshop topics.

Density and CDF

A continuous random variable X has density f(x) = 3x²/8 for 0 < x < 2 and zero elsewhere.

  1. Check that the density integrates to 1.
  2. Find the CDF and the median.
  3. Find the expected value.
Show solution

Integration gives F(x) = 0 for x ≤ 0, x³/8 for 0 < x < 2 and 1 for x ≥ 2. The median solves F(x) = 1/2, giving ∛4 ≈ 1.587. Integrating 3x³/8 from 0 to 2 gives E[X] = 1.5.

Normal and binomial

A sensor produces independent, normally distributed readings with mean 50 and standard deviation 5. Readings between 45 and 55 are accepted.

  1. Standardise the bounds and find the probability p that a reading is accepted.
  2. What distribution describes the count of accepted readings out of 20? Find its mean and variance.
Show solution

The standardised bounds are −1 and 1, so p = Φ(1) − Φ(−1) ≈ 0.6827. The count follows Binomial(20, p), with mean 20p ≈ 13.65 and variance 20p(1 − p) ≈ 4.33.

Joint distribution

Two binary indicators X and Y have joint probabilities P(0,0) = 0.40, P(0,1) = 0.10, P(1,0) = 0.20 and P(1,1) = 0.30.

  1. Find P(X = 1), P(Y = 1) and P(Y = 1 | X = 1).
  2. Test for independence and find the covariance.
Show solution

The marginals are 0.50 and 0.40. The conditional probability is 0.30/0.50 = 0.60. The variables are dependent because 0.30 ≠ 0.50 × 0.40. The covariance is E[XY] − E[X]E[Y] = 0.30 − 0.20 = 0.10.