MGU · BSc (Hons) Statistics · Semester 2

Introduction to Statistical Modelling

Build probability models from the basics, understand what their parameters mean, and practise solving distribution problems and spreadsheet tasks step by step.

MG2DSCSTA100  |  4 CREDITS  |  75 HOURS

How to use this guide

A probability distribution is a mathematical description of uncertainty. It tells us which values a random quantity can take and how probability is assigned to those values.

Study sequence: describe the random variable → understand its probability function → calculate expectation and spread → recognise a distribution model → solve and interpret a problem → check with a spreadsheet.

This guide follows the supplied MGU syllabus for MG2DSCSTA100. It does not add proof requirements where the syllabus asks students to demonstrate properties or solve simple problems. The detailed assessment is 50 ESE theory marks (2-, 6- and 12-mark questions) and 35 practical marks; CCA includes theory and practical components. No question below is claimed to be an actual or guaranteed MGU question.

Course outcomes in plain language

  • Understand random-variable and distribution ideas.
  • Recognise and use the distributions listed in the syllabus.
  • Analyse where distribution models are useful.
  • Fit, evaluate and simulate distributions with spreadsheet tools.

Course concept map and priorities

UNCERTAIN OUTCOME → RANDOM VARIABLE → PMF / PDF → CDF
→ FUNCTIONS & TRANSFORMATIONS → JOINT DISTRIBUTION
→ MARGINAL / CONDITIONAL DISTRIBUTION → INDEPENDENCE
→ EXPECTATION → MEAN, VARIANCE & GENERATING FUNCTIONS
→ CHOOSE A MODEL: DISCRETE OR CONTINUOUS DISTRIBUTION
→ CALCULATE PROBABILITIES / EXPECTATIONS → SPREADSHEET CHECK & SIMULATION

Each step adds a tool: first assign numbers to outcomes, then describe probabilities, summarise the random quantity, and choose a useful distribution model.

MUST MASTER: PMF/PDF/CDF distinctions, expectation and variance, standard discrete/continuous distribution problems, normal standardisation, spreadsheet work. These support several outcomes and the course’s numerical/practical goals.

IMPORTANT: transformations, joint/marginal/conditional distributions, generating functions, distribution properties and memorylessness.

QUICK-SCORE: precise definitions, support, parameter meanings, standard properties, conditions for selecting a model.

These priorities reflect syllabus outcomes, hours and assessment; they do not predict marks for individual topics.

Suggested study time: three 15-hour theory modules plus 30 hours of spreadsheet practice are listed. Outside class, revisit examples in short sessions and reserve regular time for spreadsheet record work (minimum 10 problems).

MODULE 1 · 15 HOURS

Random variable theory

You will learn: univariate discrete and continuous random variables; PMF, PDF and CDF; functions and transformations; bivariate variables; joint, marginal and conditional distributions; independence.

Why it matters: these ideas are the language used to describe chance numerically and connect outcomes with probabilities.

Concept route: random variable → probability assignment → cumulative probability → transform → pairs of variables → conditional view and independence.

1.1 Random variables: discrete and continuous

A random variable assigns a number to each outcome of a random experiment. It is usually written X. The number need not itself be uncertain after the experiment; it is uncertain before the outcome is known.

Example: Toss two coins and let X be the number of heads. Possible values are 0, 1, 2, so X is discrete. Let Y be the waiting time for a bus, measured in minutes; it can take values throughout an interval, so it is modelled as continuous.

Discrete means countable separate values; continuous means values over a continuum/interval. A measured continuous quantity is often rounded in practice, but its model can still be continuous.

1.2 PMF, PDF and CDF

A probability mass function (PMF) gives the probability of each value of a discrete random variable. A probability density function (PDF) describes density for a continuous variable; probabilities are areas, not heights. The cumulative distribution function (CDF) gives the probability that X is at most x.

Handwritten formula summary for discrete probability mass functions, continuous probability densities and cumulative distribution functions.

For a discrete X, add PMF values up to x. For a continuous X, integrate the PDF up to x. A CDF never decreases, approaches 0 far to the left and 1 far to the right, and probability over an interval is obtained from the difference of CDF values.

Easy PMF example: Let X be the outcome of a fair coin coded as 0 for tails and 1 for heads. Then p(0)=p(1)=1/2; both are nonnegative and sum to 1. F(0)=1/2, and F(1)=1.
Easy PDF example: If f(x)=1 for 0≤x≤1 and 0 otherwise, total area is rectangle width 1 × height 1=1. P(0.2<X≤0.7)=0.7−0.2=0.5.
Common trap: for continuous X, P(X=x)=0 at any single point under a continuous model. The PDF height f(x) is not itself the probability at x; area over an interval is probability.

1.3 Functions and transformations (univariate)

If X is random and Y=g(X), then Y is also random. A transformation changes the value assigned to each outcome. For a discrete variable, list possible X values, calculate g(x), and combine probabilities when different x values produce the same y.

Example: Let X take −1 and +1 with probability 1/2 each, and Y=X². Both outcomes give Y=1, so P(Y=1)=1. Do not list y=1 twice as two separate values.

For a continuous variable, one basic method is to find the CDF of Y from Fᵧ(y)=P(g(X)≤y), then differentiate when the resulting CDF has a density.

Continuous example: Let X be uniform on [0,1] and Y=X². For 0≤y≤1, Fᵧ(y)=P(X²≤y)=P(X≤√y)=√y. Thus fᵧ(y)=1/(2√y) for 0<y<1. The transformed variable is not uniform: squaring changes how probability is spread.
Exam caution: first state the range/support of Y and whether the transformation is many-to-one; then assign or derive probabilities. Do not assume a transformed variable has the same distribution as X.
Bivariate random variable and joint distribution: definitions and conditions for discrete joint PMF, continuous joint PDF, joint CDF, and an example joint probability table.Marginal and conditional distributions: discrete marginal formulas for X and Y and the conditional PMF of X given Y.

For continuous variables, replace sums with integrals and divide joint density by the relevant marginal density.

Worked example: P(X = 1 given Y = 1) = 0.4 / 0.7 = 4/7, approximately 0.571.

X and Y are independent if knowing one does not change the distribution of the other. For discrete variables, check p(x,y)=pX(x)pY(y) for all pairs. In the table, p(1,1)=0.4 but pX(1)pY(1)=0.5×0.7=0.35, so X and Y are not independent.

Common mistakes: confuse a joint probability with a marginal; forget to divide by the conditioning probability; testing independence at only one pair is not enough to establish independence.

Module 1 recap

Key ideas: random variable; discrete/continuous support; PMF; PDF; CDF; transformation; joint distribution; marginal; conditional; independence.

Expected / Exam-Focused Questions based on the syllabus: define a random variable; state PMF/PDF/CDF properties; obtain a marginal from a joint table; calculate a conditional distribution; test independence; find the distribution of a simple discrete transformation.

Self-test: (1) Is number of arrivals in an hour discrete or continuous? (2) What is the difference between a PDF value and interval probability? (3) From the table, find P(X=0). (4) Find P(Y=0|X=1). (5) Does a marginal retain information about the other variable?

MODULE 2 · 15 HOURS

Mathematical expectation

You will learn: expectation and its properties; common averages and variability in expectation notation; moment-generating and characteristic functions.

Why it matters: a whole probability distribution can be hard to describe. Expectation and variance provide concise summaries; generating functions encode moments in a useful form.

Concept route: weighted average → summaries of spread → transform of distribution → recover moments/properties.

2.1 Mathematical expectation

Expectation is the long-run probability-weighted average of a random variable. It is not necessarily a value the variable can actually take.

Discrete: E(X)=Σₓ x p(x)    Continuous: E(X)=∫ x f(x) dx

Each possible value is weighted by its probability or density; for a valid finite expectation, the required sum/integral must exist.

Step-by-step: X is 0 or 1, each with probability 1/2. Given: values 0,1 and probabilities 1/2,1/2. Required E(X). Formula: Σxp(x). Substitute: 0×1/2+1×1/2=1/2. Answer: E(X)=0.5. Interpretation: over many such trials, the average coded outcome approaches one half.

Linearity: E(aX+b)=aE(X)+b. For sums, E(X+Y)=E(X)+E(Y), even without independence, provided expectations exist.

2.2 AM, GM, HM, mean deviation and variance in terms of expectation

Mean: μ=E(X)   ·   Variance: Var(X)=E[(X−μ)²]=E(X²)−[E(X)]²

Variance is expected squared distance from the mean. Standard deviation is its square root, returning to the original measurement units.

Mean absolute deviation about a: E|X−a|

For a random variable, the probability-weighted arithmetic mean is E(X). For positive values, geometric and harmonic means can be expressed using logs and reciprocal values: GM=exp(E[ln X]) and HM=1/E(1/X), where the expectations exist. For a finite equally weighted data set these reduce to the familiar formulas from Semester 1. The syllabus asks for simple problems.

Variance example: X=0 or 1 with probability 1/2 each. E(X)=1/2 and E(X²)=0²/2+1²/2=1/2. Thus Var(X)=1/2−(1/2)²=1/4; SD=1/2. Interpretation: the coded result varies around its mean 0.5 with SD 0.5.

Useful properties: Var(aX+b)=a²Var(X); adding a constant shifts the mean but not the spread. If X and Y are independent, Var(X+Y)=Var(X)+Var(Y). Do not apply the last equality without the independence condition (or other appropriate covariance information).

2.3 Moment-generating and characteristic functions

A generating function turns distribution information into a function. Differentiating a moment-generating function at zero gives moments when it exists near zero.

MGF: Mₓ(t)=E(eᵗˣ);   Mₓ(0)=1;   M′ₓ(0)=E(X);   M″ₓ(0)=E(X²)

For independent variables, the MGF of a sum is the product of their MGFs when the relevant MGFs exist. This can simplify sums and help identify distributions.

Characteristic function: φₓ(t)=E(eⁱᵗˣ), where i²=−1;   φₓ(0)=1

The characteristic function exists for every probability distribution and is complex-valued in general. It also encodes distribution information. At this syllabus level focus on definition, properties covered in class and simple problems, not advanced inversion theory.

Bernoulli example: X=1 with probability p and 0 with probability 1−p. Mₓ(t)=(1−p)e⁰+peᵗ=1−p+peᵗ. M′ₓ(t)=peᵗ, so M′ₓ(0)=p=E(X).
Common mistakes: E(X²) is not [E(X)]²; variance uses the difference E(X²)−[E(X)]²; a constant added to X does not change variance; MGF and characteristic function are related but not identical.

Module 2 recap

Key ideas: probability-weighted average; linearity; raw and central moments; expectation forms of means; variance; MGF; characteristic function.

Expected / Exam-Focused Questions: calculate E(X) and Var(X) from a PMF; show a simple expectation property numerically; find mean/variance using an MGF; define and distinguish MGF and characteristic function.

Self-test: (1) Can E(X) lie between possible values? (2) If E(X)=3 and E(X²)=11, find variance. (3) What happens to variance under X+5? (4) What is M(0)? (5) What is the Bernoulli MGF?

MODULE 3 · 15 HOURS

Discrete and continuous distributions

You will learn: discrete uniform, Bernoulli, binomial, Poisson, geometric, continuous uniform, exponential, gamma and normal distributions.

Why it matters: each model captures a recurring pattern of uncertainty. Recognising the situation lets us calculate probabilities efficiently.

Suggested method: identify discrete/continuous, define X and its support, choose a model, write parameter values, compute, then interpret.

3.1 Discrete uniform, Bernoulli and binomial

Discrete uniform: each of the n listed outcomes has probability 1/n. For a fair six-sided die, P(X=x)=1/6 for x=1,…,6.

Bernoulli: one trial with two outcomes, coded success (1) with probability p and failure (0) with probability 1−p. Mean p; variance p(1−p).

Binomial: counts successes in n independent Bernoulli trials with the same success probability p.

P(X=k)=C(n,k)pᵏ(1−p)ⁿ⁻ᵏ, k=0,…,n;   E(X)=np;   Var(X)=np(1−p)

C(n,k) counts ways to place k successes among n trials. The factors represent k successes and n−k failures. Check fixed n, two outcomes per trial, constant p and independence.

Step-by-step example: A fair coin is tossed 3 times. Find P(exactly 2 heads). Define X=#heads; n=3, p=0.5, k=2. P(X=2)=C(3,2)(0.5)²(0.5)¹=3×0.25×0.5=0.375. Answer: 3/8. Interpretation: in many sets of three fair tosses, about 37.5% have exactly two heads.

3.2 Poisson and geometric distributions

Poisson: models a count of occurrences in a specified interval when an average rate λ is appropriate. Support is 0,1,2,…

P(X=k)=e⁻λ λᵏ/k!;   E(X)=λ;   Var(X)=λ
Example: If the model gives an average of λ=2 calls per interval, P(X=0)=e⁻²≈0.1353. About 13.5% of intervals are predicted to have no calls under this model.

Geometric: number of independent trials up to and including the first success, with constant success chance p. This guide uses support 1,2,…; state the convention because some texts count failures before success.

P(X=k)=(1−p)ᵏ⁻¹p, k=1,2,…;   E(X)=1/p;   P(X>m+n | X>m)=P(X>n)

The last equality is the lack-of-memory property: conditional on still waiting after m failures, the additional wait has the original geometric distribution.

Check: If p=1/4, probability first success occurs on trial 3 is (3/4)²(1/4)=9/64.

3.3 Continuous uniform distribution

If X is equally spread across an interval [a,b], its density is constant there. Probability is interval length divided by total length.

f(x)=1/(b−a), a≤x≤b;   E(X)=(a+b)/2;   Var(X)=(b−a)²/12
Example: X is uniform on [0,10]. P(2<X<5)=(5−2)/(10−0)=0.3. Endpoints do not affect the probability for a continuous variable.

3.4 Exponential and gamma distributions

Exponential: models a nonnegative waiting time with rate λ>0.

f(x)=λe⁻λˣ, x≥0;   F(x)=1−e⁻λˣ;   E(X)=1/λ;   Var(X)=1/λ²
Step-by-step: Let waiting time have rate λ=0.5 per minute. Probability wait exceeds 2 minutes is P(X>2)=e^(−λ×2)=e⁻¹≈0.3679. This is the model probability of waiting more than two minutes.

The exponential distribution has lack of memory: P(X>s+t | X>s)=P(X>t). Knowing that a wait has already lasted s does not change the model distribution of the additional wait.

Gamma: a continuous distribution on x>0 with shape α>0 and rate λ>0 in the rate parameterisation below. It generalises waiting-time models; when α=1 it is exponential with rate λ.

f(x)=λᵅ xᵅ⁻¹e⁻λˣ / Γ(α), x>0;   E(X)=α/λ;   Var(X)=α/λ²

Γ(α) is the gamma function/normalising factor that makes total density area 1. If your class uses a scale parameter θ=1/λ, use the corresponding form and state which parameterisation you use.

3.5 Normal distribution and standard normal table

The normal distribution is a continuous, symmetric, bell-shaped model determined by mean μ and variance σ². Values near μ are more common; the curve’s total area is 1.

X ~ N(μ,σ²);   Z=(X−μ)/σ ~ N(0,1)

Standardisation measures how many standard deviations x lies above or below the mean. A standard normal table may give left-tail Φ(z)=P(Z≤z); always check the table heading.

Step-by-step example: Marks are modelled as normal with μ=60 and σ=10. Find the standard score for x=70. Given μ=60, σ=10, x=70. z=(70−60)/10=1. Answer z=1. Interpretation: 70 is one standard deviation above the mean. If a table gives Φ(1)=0.8413, then P(X≤70)=0.8413 and P(X>70)=1−0.8413=0.1587.

For intervals, translate both endpoints to z-scores and use the table consistently: P(a<X<b)=Φ(zᵦ)−Φ(zₐ). Symmetry gives Φ(−z)=1−Φ(z).

Common distribution-selection traps: binomial counts a fixed number of trials; Poisson counts events in an interval; geometric counts trials until first success. For waiting time, distinguish exponential from geometric. For normal tables, check whether entries are left-tail, mean-to-z, or another format.

Module 3 recap

Key ideas: uniform discrete; Bernoulli; binomial; Poisson; geometric; continuous uniform; exponential; gamma; normal; standard normal.

Expected / Exam-Focused Questions: identify a distribution from a situation; state its support and parameters; calculate a binomial/Poisson probability; explain geometric or exponential memorylessness; calculate normal probabilities with a standard table.

Self-test: (1) Which model counts successes in fixed n trials? (2) For Poisson λ=3, what are mean and variance? (3) What does p mean in a geometric model? (4) Standardise x=75 when μ=65, σ=5. (5) If X~Uniform(2,8), calculate P(X>5).

MODULE 4 · 30 HOURS

Spreadsheet for statistical computing

Course requirement: use spreadsheet functions for numerical problems associated with the modules. A practical record with at least 10 problems must be submitted.

Workflow: enter/label inputs → select model and parameters → use spreadsheet formulas/functions → check against theory or a small manual calculation → interpret output → record procedure.

Ten-plus practical record ideas

  1. Create a discrete PMF table; check probabilities sum to 1; calculate its CDF.
  2. Use a joint PMF table to obtain marginal distributions and verify totals.
  3. Calculate a conditional distribution from a joint table; test independence.
  4. Calculate E(X), E(X²), variance and standard deviation from a PMF.
  5. Use a Bernoulli/binomial function or formula to calculate event probabilities.
  6. Calculate Poisson probabilities for several k values and compare cumulative probability.
  7. Calculate geometric probabilities and verify a finite partial sum is at most 1.
  8. Use continuous uniform and exponential CDF formulas for interval/tail probabilities.
  9. Standardise observations and use the software’s normal CDF/inverse functions; compare with a standard normal table.
  10. Simulate repeated Bernoulli trials using a random-number function; compare empirical proportion with p.
  11. Simulate binomial counts or waiting times and compare a frequency graph with theoretical probabilities.

Use the software available in your practical class. Function names differ; typical spreadsheet programs provide binomial, Poisson and normal distribution functions and random-number generation. Record the exact function and argument order used.

Practical checks: label parameter cells and units; lock references when filling formulas; verify probability totals; distinguish rate from scale in gamma/exponential input; set random seeds if the software permits and reproducibility matters; simulated values vary from run to run.

Practical/viva preparation

  • What do PMF, PDF and CDF spreadsheet outputs represent?
  • How do you check that a discrete distribution is valid?
  • How do you obtain a marginal distribution from joint data?
  • Which cell references change when a formula is copied? How can a reference be made absolute?
  • Why does a simulation not exactly equal its theoretical probability in a finite number of trials?
  • How can you compare observed and theoretical probabilities using a table or graph?
  • How did you choose the distribution and its parameters in your practical record?

For each submitted record problem, include: objective, given data/parameters, formula or function, output, one verification, interpretation and conclusion.

Spreadsheet exam connection: practical assessment gives 30 marks for problem-solving skills and 5 for the record. Practise both accurate operation and explaining why the output answers the question.

Open revision plans, module checklists and question bank →