Skip to main content
Introduction to Statistical Methods

Gaussian Mixture Models, Maximum Likelihood Estimation, and Hypothesis Testing

📅 Published: 2026-07-07
🎓 Level: postgraduate
👥 Audience: Postgraduate students in statistics and data science

Gaussian Mixture Models, Maximum Likelihood Estimation, and Hypothesis Testing Review

16.1 Gaussian Mixture Models — Recap and Mathematical Representation

Hook. What if a data point sits right in the overlap between two clusters — neither fully in one nor the other? Hard clustering forces you to pick a side and lie about the uncertainty. Gaussian mixture models don't. They give you honest probabilities: "this point is 60% cluster A, 40% cluster B."

16.1.1 What a Gaussian Mixture Model Is

Intuition. Imagine two radio stations broadcasting on nearby frequencies. When you tune your dial, you hear a blend — sometimes one station louder, sometimes the other. A Gaussian mixture model works the same way: it blends bell curves instead of radio signals. Each bell curve is a component, and the blend knob — how loud each component plays — is called the mixing coefficient.

The analogy breaks when components overlap completely: radio signals interfere destructively, but Gaussians just add their probability densities together. Still, the blend idea is what matters.

A Gaussian mixture model (GMM) is a weighted sum of several Gaussian distributions. Each Gaussian has its own parameters — its own mean and its own variance (or covariance matrix for multivariate data). The need for GMMs arises when data clusters overlap — when a point could reasonably belong to more than one cluster.

The core idea: take a set of Gaussians, assign each one a weight — called a mixing coefficient (how "loud" that component is in the overall blend). Sum them to get a single overall distribution. That overall distribution is your GMM.

16.1.2 Hard Clustering vs Soft Clustering

In hard clustering — like k-means — every point belongs to exactly one cluster. You compute Euclidean distance. Whichever centroid is closer, the point goes there. No ambiguity, no probability. That works fine when clusters are well separated.

In soft clustering — which GMM gives you — a point can belong to multiple clusters with different probabilities. This matters when clusters overlap. If a point falls in the overlapping region, hard clustering forces a binary decision. Soft clustering says: this point is 60% likely from cluster A and 40% likely from cluster B. That is a much more honest answer.

The professor gave this real-world example: suppose two companies' share prices both follow normal distributions, but with different means and standard deviations. If you mix the two sets of daily returns and plot them, you get a GMM. Some returns unmistakably belong to company A. Some unmistakably belong to company B. And some could be from either — the soft assignment captures that ambiguity.

Formalize — the GMM as a weighted sum. A GMM with components builds the overall density as a convex combination of Gaussian densities. Each component gets a weight (the mixing coefficient). These weights must be non-negative and sum to 1 — they are probabilities over components.

The model has three families of parameters per component:

  • Mixing coefficient : how much of the overall mixture comes from component . , .
  • Mean : the center of component . For -dimensional data, .
  • Covariance matrix : how component spreads and rotates in -dimensional space. is , symmetric, positive definite. In one dimension (), it collapses to the scalar variance .

The full density is:

where each component is a multivariate Gaussian:

The professor put it simply: "Pi one into the first Gaussian plus Pi two into the second gives P of X." In the 1D case (), the multivariate Gaussian collapses to the familiar bell curve:

As the professor noted: "If you take d equal to 1, then we go back to this simple one random variable which follows Gaussian distribution." The multivariate form is the general case; the 1D form is what you use in exam numerical problems.

SymbolMeaningDomain
Number of Gaussian components
Mixing coefficient for component ,
Mean vector of component
Covariance matrix of component , symmetric positive definite
Variance (1D case only)
A data point (observation)

16.1.3 The Covariance Matrix — Why It Appears

When you work with a single Gaussian random variable, you have a mean and a variance . But with multiple random variables, variance alone is not enough. You need a variance-covariance matrix.

The professor explained: "Instead of Sigma one, it is variance covariance matrix or simply covariance matrix." The case tells the whole story:

  • is the variance of — how much spreads on its own.
  • is the variance of .
  • is the covariance between and — it captures how they move together. Positive covariance means when is large, tends to be large too.

For random variables, you get a matrix. In the 1D case, the matrix collapses to the scalar . In exam problems with one variable, you use ; in real implementations with multiple variables, you use the full covariance matrix.

Assumptions & Scope. The GMM assumes your data actually arises from a mixture of Gaussians. If the true distribution is skewed, heavy-tailed, or has non-elliptical clusters, the model is fundamentally misspecified and will give poor density estimates. The professor flagged this explicitly: "We can't expect that all data are drawn from Gaussian distributions." GMMs also assume you know — the number of components — in advance. In practice you either pick by domain knowledge or use model selection criteria like BIC. The model works best when clusters are roughly elliptical and you need soft assignments rather than hard boundaries.

Visual Intuition. Picture a plot with your data variable on the x-axis and probability density on the y-axis. Draw two bell curves centered at different means with different spreads. The taller, narrower curve has a bigger mixing coefficient . Now sum them point by point along the x-axis — the result is a single wavy curve that might have two humps (bimodal) or one broad hump (if the Gaussians overlap heavily). The GMM density is that summed curve. Where the two component curves cross is where soft clustering matters most — data in that zone gets split probabilities.

Pitfalls.

  • Confusing hard and soft clustering. K-means gives you one cluster per point; GMM gives you probabilities. Don't treat GMM responsibilities as hard assignments unless you threshold them.
  • Forgetting the mixing coefficient constraint. The must sum to 1. If you initialize them without normalizing, your GMM is not a valid probability distribution.
  • Thinking is always obvious. The two-companies example has by construction, but real data rarely gives you that luxury. Choosing is a genuine challenge — like choosing the number of clusters in k-means.
  • Ignoring the Gaussian assumption. GMMs work beautifully when your data is approximately Gaussian. They fail silently when it isn't — always check your data before applying GMMs.

16.1.4 Student Questions and Answers

Q: Is variance covered as part of covariance in the GMM parameter list? Because we said a GMM has mean, variance, covariance, and mixing coefficient.

A: Yes. When you talk about a single random variable, you have mean and variance. When you talk about a combination of Gaussian variables — multivariate — it is not going to be only variance. It is a variance-covariance matrix. So the covariance matrix subsumes the variance. For the univariate case (), the covariance matrix collapses to just .

Q: If we are working with a 1D numerical example (only one variable), why do we not see the covariance matrix in the formula?

A: To avoid complexity. In a 1D numerical example, we just want to understand the algorithm. The full covariance matrix comes in when you have more than two variables. In the 1D case, you just use . In general — when you implement a GMM for real data — you use the full covariance matrix.

Q: Don't we already know the number of Gaussian components ? If there are two companies with two share prices, — why is choosing a challenge?

A: In that simple example, yes, you know . Those are clear cases. But in real data, you cannot expect the mixture to be that clean. Real data may have many overlapping components, and you do not know in advance. You have to choose it — just like choosing the number of clusters in k-means. That is one of the two main challenges of GMMs.

Recap. A GMM is a weighted blend of Gaussian bell curves. Each component has a mean, a covariance, and a mixing coefficient. Soft clustering via GMM gives you honest probabilities instead of forced binary assignments. But you need to know and your data should roughly follow a mixture of Gaussians.

Bridge. Once you have the GMM formula, the hard problem is finding the best parameters — the means, covariances, and mixing coefficients. Direct maximum likelihood doesn't have a closed form because of the sum-inside-a-log. The EM algorithm (next section) solves this by alternating between guessing which component each point came from and updating the parameters.

Real-World & Domain Connection. GMMs power soft clustering in customer segmentation — a shopper who buys both luxury and discount items isn't just "luxury" or "budget," they're a mix. In computer vision, GMMs model background pixels in video surveillance: each pixel's color over time is a mixture of Gaussians, and anything that doesn't fit the mixture is flagged as a moving object. In quantitative finance, GMMs model asset returns from mixed regimes (bull market, bear market, sideways) without needing to know which regime each day belongs to.

16.2 Expectation Maximization (EM) Algorithm for GMM

Hook. You have a GMM with unknown parameters. You want the best means, covariances, and mixing coefficients. Maximum likelihood sounds perfect — until you try to solve it and hit a sum buried inside a logarithm. No algebra trick gets you a clean answer. What do you do? You don't solve it directly. You guess, improve, guess again, improve — that's EM.

16.2.1 Why We Need EM

Purpose. A GMM has three sets of parameters: the means , the covariance matrices , and the mixing coefficients . You want to find the values that maximize the likelihood of your observed data. The log-likelihood of a GMM looks innocent but hides a trap:

The sum over sits inside the logarithm. Differentiating this directly gives coupled equations with no closed-form solution. As the professor put it: "Because of this mathematical representation, it becomes too complex. Very difficult to solve this." EM solves this by introducing a latent variable — "which component did each point come from?" — and alternating between guessing the latent variable and optimizing the parameters.

16.2.2 The EM Algorithm — Inputs, Outputs, and Steps

Inputs & Outputs.

  • Input: A dataset , the number of components , and a convergence threshold.
  • Output: Estimated parameters for , plus the responsibility matrix for every point-component pair.

Steps. The professor described it as: "First we initialize the parameters. Then two steps. E step and M step."

Step 0 — Initialization. Pick starting values for all parameters. Random means , identity or diagonal covariances , and uniform mixing coefficients . The mixing coefficients must sum to 1 — if you pick random values, normalize them: .

Step 1 — E-step (Expectation). Using the current parameters, compute the responsibility — the posterior probability that data point came from component :

The denominator is the total GMM density at — it normalizes the responsibilities so that for each point , . The numerator is component 's contribution. This is Bayes' theorem: prior , likelihood , posterior .

Step 2 — M-step (Maximization). Using the responsibilities from the E-step, re-estimate the parameters to maximize the expected log-likelihood:

Each update is a weighted average. is the "effective number of points" assigned to component . The mean update is a responsibility-weighted average of the data. The covariance update is a responsibility-weighted outer product of deviations. The professor summarized: "Based on E step we go further and update the parameters. In turn, this maximizes the likelihood."

Iterate. Go back to E-step with the new parameters, then M-step again. "Keep on iterating between E step, M step and so on till it reaches the convergence."

Final assignment. Once converged, assign each data point to the component with the highest responsibility . "Wherever the probability is highest, we assign that data point to the corresponding cluster because the probability is more for it."

Trace — one iteration on a tiny 2-point, 2-component problem. Suppose , two 1D points: , . Initialize: , , , .

E-step. Compute responsibilities for :

Denominator: . So:

Point almost certainly belongs to component 1. For : the situation reverses — , .

M-step. , . (Effective counts sum to .)

The means have shifted toward their respective points. (unchanged). Covariances update similarly. The algorithm would iterate until , .

Sense-check: After one iteration, moved from 1.0 to ~2.0 — towards . moved from 6.0 to ~5.0 — towards . The EM algorithm is doing exactly what it should: pulling each component's mean toward the points it's responsible for.

When to Use / Alternatives.

  • Use EM for GMM when you need soft cluster assignments and your data is roughly Gaussian. EM is the standard approach — it's guaranteed to improve the likelihood at each step (though it may converge to a local maximum).
  • Alternatives: K-means is simpler and faster when clusters are spherical and you only need hard assignments — in fact, k-means can be seen as a limiting case of GMM-EM where all covariances approach zero. For non-Gaussian data, consider DBSCAN (density-based) or spectral clustering.
  • Local optima trap: EM converges to a local maximum of the likelihood, not the global one. Different random initializations can give different results. Run EM multiple times with different starting points and pick the one with the highest final likelihood.
SymbolMeaningDomain
Responsibility — posterior probability point came from component
The -th data point
Total number of data points
Effective number of points assigned to component

16.2.3 GMM Challenges and Limitations

Assumptions & Scope. EM for GMMs inherits all the GMM assumptions from section 16.1. The Gaussian assumption is paramount — if your data is not a mixture of Gaussians, EM will still run and give you answers, but they'll be wrong. EM also assumes the data points are independent and identically distributed (IID). The number of components must be fixed before running. EM guarantees the likelihood never decreases, but it can converge to a saddle point or a poor local maximum — it does not guarantee finding the global optimum.

Visual Intuition. Picture a scatter plot with two overlapping clouds of points. Draw two ellipses — one for each Gaussian component — centered at initial random positions. The E-step colors every point with a blend of the two ellipse colors, weighted by how close the point is to each ellipse center. The M-step then shifts, rotates, and resizes each ellipse to match the weighted average of the points it "owns." With each iteration, the ellipses settle into the natural clusters. The likelihood curve is like a landscape with hills and valleys — EM is a hiker who takes the steepest uphill step from their starting position, but might end up on a foothill instead of the summit.

Pitfalls.

  • Thinking EM gives the global optimum. It doesn't. EM finds a local maximum. Run it multiple times with different random starts — the highest final likelihood wins.
  • Confusing exam mode with implementation mode. In exam problems, parameters are given — you just compute responsibilities. In code, you must iterate E and M until convergence. Don't mix these up.
  • Forgetting to normalize mixing coefficients. Initialize however you want, but always divide by the sum so they add to 1.
  • Singular covariance. If a component collapses onto a single point (or a few collinear points), its covariance matrix can become singular and the likelihood blows up. This is a known failure mode of GMM-EM — use regularization (add a small constant to the diagonal of ) to prevent it.

16.2.4 Student Questions and Answers

Q: In numerical problems, the parameter values (, , ) are given directly — we do not have to iterate EM. Is that correct?

A: Yes. In exam numerical problems, the parameters and mixing coefficients are provided. You just compute the posterior probability (responsibility). But when you go for implementation — actually coding a GMM — you start with random initializations. Then you loop: E-step, M-step, E-step, M-step, updating each time until convergence.

Q: When initializing the mixing coefficients, how do we ensure ?

A: You have to take care of that constraint. If , then . The sum of all mixing coefficients must be 1. In random initialization, you can pick values and normalize them: divide each by their sum.

Recap. EM solves the GMM parameter estimation problem by alternating between the E-step (compute soft assignments — "guess which component") and the M-step (update parameters — "fit components to their assigned points"). It finds a local maximum of the likelihood, not necessarily the global one.

Bridge. The E-step's responsibility formula is the core computational unit of EM. It's built directly from Bayes' theorem. The next section (16.3) shows you exactly how that mapping works — prior, likelihood, posterior — and gives the 2-component formula you'll use in exam problems.

Real-World & Domain Connection. EM isn't just for GMMs — it's one of the most widely used algorithms in statistics for any problem with latent (hidden) variables. It appears in hidden Markov models (speech recognition), missing data imputation (clinical trials where patients drop out), and topic models like Latent Dirichlet Allocation (document clustering). The GMM-EM combination specifically is the default choice for soft clustering in Python's scikit-learn (sklearn.mixture.GaussianMixture) and is used in bioinformatics for population structure inference from genetic markers.

16.3 GMM — Posterior Probability (Responsibility) Computation

Hook. You know a data point's value and you know the GMM parameters. But you don't know which component generated the point. How do you decide? You don't guess blindly — you compute the probability that each component was the source, given what you observed. That probability is the responsibility.

16.3.1 The Responsibility Formula — Connecting to Bayes' Theorem

Intuition. Think of a detective at a crime scene. Two suspects could have committed the crime (component 1 and component 2). The detective has a prior belief about each suspect's guilt (the mixing coefficients and ). Then they find a piece of evidence — say, a fingerprint. The likelihood is "how likely would this fingerprint be if suspect 1 committed the crime?" and similarly for suspect 2. Bayes' theorem combines the prior with the likelihood to give the posterior — the updated probability that each suspect is guilty, given the evidence. That posterior is exactly the GMM responsibility.

The analogy breaks because in a GMM there's no actual "guilty" component — every point truly came from exactly one component (in the generative model), but we can never know which. Still, the detective updating beliefs is the right mental picture.

The professor drew a direct line from Bayes' theorem to the GMM responsibility formula. Here is the full derivation:

Step 1 — Bayes' theorem for two classes. Consider two classes and . For evidence :

This is the standard Bayes formula with the total probability expanded in the denominator.

Step 2 — Map GMM terms to Bayes terms. Let = "the point came from Gaussian component 1" and = "came from component 2." Then:

  • Prior: (mixing coefficient — how common component 1 is overall)
  • Prior:
  • Likelihood: (how probable the observed is under component 1's bell curve)
  • Likelihood:

Step 3 — The responsibility formula. Substitute into Bayes:

For component 2, the numerator changes but the denominator stays the same:

The denominator is the total GMM density at that point — it's the same for all components. It guarantees that . The numerator is the component-specific contribution.

Formalize — the general K-component responsibility. For components, the responsibility of component for data point is:

The professor summarized it: "This is drawn from our basic understanding of conditional probability and Bayes' theorem. Total probability in the denominator, component probability in the numerator."

Worked mini-example. A 2-component 1D GMM: , , ; , , . Compute the responsibility for .

First, compute each Gaussian density at :

Now the weighted numerators and denominator:

Finally, the responsibilities:

Verdict: is about 63% likely from component 1 and 37% from component 2. The point is closer to (distance 1) than to (distance 5), and component 1 has the larger prior (0.6 vs 0.4), so the 63% assignment makes sense.

Assumptions & Scope. The responsibility formula assumes you already have the GMM parameters (). It is the E-step of EM — you use current parameters to compute soft assignments. The formula is valid for any and any dimension . In the 1D case (), replace the multivariate Gaussian with the univariate one. The formula always gives probabilities that sum to 1 across components for each point — this is a built-in sanity check. If your values don't sum to 1, you made an arithmetic error.

Visual Intuition. Draw the x-axis with two bell curves: a taller one at (weight 0.6) and a shorter one at (weight 0.4). At , drop a vertical line. This line intersects the scaled curve for component 1 at height and the scaled curve for component 2 at height . The total height of the GMM curve at is their sum, . The responsibility is the ratio of the component-1 height to the total height — it's the fraction of the total density that component 1 contributes at that x-location.

Pitfalls.

  • Forgetting the denominator is the same for all components. Compute it once, reuse it. Many students recompute it separately for each component and introduce rounding errors.
  • Mixing up which Gaussian uses which parameters. Component 1's always uses and . It sounds obvious, but under exam pressure, students swap them.
  • Neglecting the mixing coefficient. The responsibility is NOT just . You must multiply by the priors . A component with a small prior gets a lower responsibility even if the data fits it well.
  • Using the wrong density formula. For 1D, use . Don't accidentally use the multivariate form with determinants and matrix inverses.

16.3.2 Student Questions and Answers

Q: The denominator formula — is it really ? Earlier it seemed like only was written in the denominator.

A: No — the denominator is the total probability. It must include both components: times the density of the first Gaussian plus times the density of the second. That is the total probability. The numerator is only the part for the component you are computing the responsibility for. "This is like our Bayes theorem. Total probability in the denominator, component probability in the numerator."

Recap. The responsibility is the posterior probability that component generated point . It's Bayes' theorem with mixing coefficients as priors and Gaussian densities as likelihoods. The denominator is the total GMM density — same for all components — guaranteeing the responsibilities sum to 1.

Bridge. Armed with the responsibility formula, you can now solve any GMM classification problem where the parameters are given. The next section (16.4) walks through two full numerical examples — computing responsibilities and assigning points to clusters.

Real-World & Domain Connection. The responsibility concept extends beyond GMMs to any mixture model. In speech recognition, each phoneme is modeled as a GMM, and the responsibility tells you how likely each frame of audio came from each phoneme. In medical diagnosis, a patient's lab result could come from a "healthy" Gaussian or a "diseased" Gaussian — the responsibility is the probability the patient has the disease given the test result. This is literally Bayesian diagnosis, and it's used in clinical decision support systems.

16.4 GMM Worked Numerical Examples

Hook. You've seen the Bayes-to-GMM mapping. Now the real test: given raw numbers — mixing coefficients, means, variances, and a data point — can you compute the responsibility and classify the point? These are the exact kinds of problems you'll see on the exam. No Z-table, no integration — just exponentials and arithmetic.

16.4.1 Example 1 — Responsibility for

A 1-dimensional GMM has two components with these parameters:

  • Component 1: , ,
  • Component 2: , ,

A new data point arrives. Compute the responsibility that this point belongs to component 1, then classify it.

Step 1 — Write the univariate Gaussian density. For any component with mean and variance :

You'll use this twice — once per component.

Step 2 — Compute each component's density at .

For component 1 (, ):

For component 2 (, ):

The professor noted: "We don't require any Z distribution table. There's simply 95 minus 94 whole square by 50, e power minus of something, that value. That's it." No integration, no table lookup — just the exponential function.

Step 3 — Weight by mixing coefficients and compute total probability.

Step 4 — Compute responsibilities.

Step 5 — Classify. Since , assign to component 1. As the professor said: "Based on the probability we assign wherever the probability is highest."

Sense-check. is 1 unit from and 5 units from . Component 1 also has the larger prior (0.6 vs 0.4). Both facts push the same way — component 1 should win. The 63.4% responsibility is about right for a point that's close but not right at .

16.4.2 Example 2 — Classifying

Two Gaussian components with these parameters:

  • , ,
  • , ,

A point is given. Which component does it belong to?

Step 1 — Compute each density at .

For component 1 (, ):

For component 2 (, ):

Step 2 — Weight and compute total probability.

Step 3 — Compute responsibility.

Step 4 — Classify. The professor stated the probability for cluster 1 came out to approximately 0.9. With we get 0.999. Either way, is overwhelmingly higher. The conclusion: belongs to cluster 1.

"Probability is more for this — therefore conclusion: X equal to 130 belongs to cluster 1."

Sense-check. is only 10 units from but 40 units from . Even though component 2 has a larger prior (0.7 vs 0.3), the distance advantage is enormous — the exponential in the Gaussian penalizes large squared distances severely. The classification is unambiguous.

Assumptions & Scope. Both examples are 1D — no covariance matrix, just . This is intentional: exam problems stay 1D to avoid matrix algebra. For real data with , replace the univariate Gaussian density with the multivariate form and use the full covariance matrix. The responsibility formula structure (weighted likelihood / total probability) remains identical regardless of dimension.

Visual Intuition for Example 2. Draw two bell curves on the same axis. Component 1: centered at 120, spread , prior weight 0.3. Component 2: centered at 170, same spread, prior weight 0.7. At , the component-1 curve is near its peak — about 0.024 — while the component-2 curve is way out in its left tail at standard deviations away. Even multiplying by the larger prior (0.7), component 2 contributes almost nothing (0.000009). The GMM density at is essentially all from component 1. The soft assignment is practically hard in this case — 99.9% vs 0.1%.

Pitfalls.

  • Forgetting the factor in the Gaussian density. Students sometimes use only the exponential part. The normalizing constant matters — without it, your densities aren't probabilities and your responsibilities won't sum to 1 correctly.
  • Computing instead of just the numerator. The factor of 2 in the denominator of the exponent is part of the Gaussian formula. Forgetting it doubles your computed distance.
  • Not squaring the difference. , not . In Example 2: , not 40.
  • Using the Z-table. The professor explicitly said: "We don't require any Z distribution table." GMM responsibility problems use raw Gaussian density evaluations, not cumulative probabilities. If you reach for the Z-table, you're solving the wrong problem.

Exam note. Expect a GMM numerical of this kind: given mixing coefficients, means, and variances for two components, plus a data point, compute responsibilities using the Bayes-like formula. No Z-table needed — just exponentials. Classify the point to the component with the higher responsibility. If you are comfortable with these two examples, you can solve any GMM responsibility problem on the exam.

Bridge. GMMs and EM give you a way to model data as a mixture of distributions and find soft cluster assignments. But what if you don't know the distribution's parameters at all? The next topic — Maximum Likelihood Estimation (section 16.5) — is the general method for estimating parameters from data, and it's the foundation that EM itself rests on.

Real-World & Domain Connection. The GMM responsibility calculation is the inference step — given a trained model, classify new points. In fraud detection, a transaction's features are plugged into a GMM of normal vs fraudulent behavior, and the responsibility tells you the fraud probability. In astronomy, stars are classified by their spectral features into stellar types using GMMs; the responsibility handles stars at the boundary between types.

16.5 Maximum Likelihood Estimation (MLE) — Foundations

Hook. You have a coin but don't know if it's fair. You flip it 10 times and get 7 heads. What's your best guess for the true heads probability? You could say 0.7 — that's the proportion you observed. But why is that the "best" guess? Maximum likelihood estimation gives you the mathematical answer — and the recipe works for any distribution, not just coins.

16.5.1 From Bayes to MLE

Intuition. Imagine you're a detective with two suspects and a piece of evidence. Bayes' theorem combines your prior suspicion (how likely each suspect is a priori) with the evidence (how likely the evidence would be if each suspect were guilty). But what if you have no prior suspicion — both suspects are equally likely? Then you just pick the suspect who makes the evidence most probable. That's MLE: ignore the priors, pick the parameter that makes the observed data most likely.

The analogy: a photographer adjusting focus. The lens position is the parameter. The blurriness of the image is the negative log-likelihood. You turn the focus ring (change the parameter) until the image is sharpest (likelihood is maximized). No priors — just data and parameter.

The professor traced the path from Bayes' theorem to MLE in three logical steps:

Step 1 — Bayes for classification. You have evidence , two classes and :

You pick the class with the higher posterior probability.

Step 2 — Drop the denominator (MAP). Both expressions share the same denominator . For comparing which is larger, it cancels out. As the professor said: "If I remove the denominator, the maximum remains the maximum." Now compare vs . This is the MAP (Maximum A Posteriori) decision rule — it still uses priors and .

Step 3 — Drop the priors (MLE). If — equal priors, or priors are unknown — you can drop them too. What remains:

But is the likelihood — the probability of observing the data given the parameter (class) . Maximizing it directly is maximum likelihood estimation.

Formalize. MLE answers: given a dataset assumed to come from a distribution with unknown parameter , what value of makes the observed data most probable?

The likelihood function is the joint probability of all observations, treated as a function of the parameter:

The product form assumes observations are independent — a standard assumption in MLE. The MLE is the value that maximizes :

In practice, we maximize the log-likelihood because the log turns the product into a sum:

The professor summarized: "That results in an expression which is maximization of probability distribution. That is where maximum likelihood is."

16.5.2 The MLE Procedure — General Recipe

The six-step MLE recipe. The professor gave this step-by-step procedure:

  1. Identify the probability distribution that models your data. Bernoulli for binary outcomes, Binomial for counts of successes, Poisson for count data, Normal for continuous measurements.
  2. Write the likelihood function — the joint probability of all observations as a function of the parameter(s). This is the product of individual probabilities: .
  3. Take the natural log to get . Products become sums: . Exponents drop down: .
  4. Differentiate with respect to the parameter to get .
  5. Set the derivative to zero and solve for : .
  6. (Optional) Check the second derivative. If at your solution, you have a maximum. "If you want, you can go further with second derivative and validate: is it the maximum or minimum? Second derivative less than 0 means maximum."

Assumptions & Scope. MLE assumes:

  • Correct model specification: the data actually comes from the distribution you chose. MLE under a wrong distribution gives wrong estimates, and you won't know it from the math alone.
  • Independence: observations are independent of each other. If data points are correlated (time series, clustered data), the product form is wrong and the MLE can be biased.
  • Large samples: MLE estimates are consistent (converge to the true value as ) and asymptotically normal, but in small samples they can be biased. The Normal variance MLE uses in the denominator, but the unbiased version uses .
  • Regularity conditions: the log-likelihood must be differentiable and the parameter space must not depend on the data. These almost always hold for the distributions in this course.

Visual Intuition. Picture a graph with the parameter on the x-axis and the likelihood on the y-axis. For a Bernoulli with 3 successes in 10 trials, the curve looks like a hill: it starts at 0 when (impossible to get successes if true probability is 0), rises to a peak at , then falls back to 0 at . The MLE is the x-coordinate of the peak. The log-likelihood has the same peak location but is easier to work with — it's a smooth concave curve that you can differentiate.

SymbolMeaningDomain
Generic parameter to be estimatedDepends on distribution
Likelihood function:
Log-likelihood: (discrete)
Maximum likelihood estimateSame domain as

16.5.3 Common Distributions and Their MLE Targets

DistributionParameter(s) to estimateMLE formula
Bernoulli (sample proportion)
Binomial (sample proportion)
Poisson (sample mean)
Normal and ,

Pitfalls.

  • Maximizing directly instead of . Products of probabilities become astronomically small for even moderate . The log-likelihood prevents numerical underflow and makes differentiation tractable. Always take the log.
  • Forgetting to set the derivative to zero. The derivative gives the critical point. You still need to solve the resulting equation — don't stop at writing the derivative.
  • Confusing the likelihood with the probability. is a function of with the data fixed, not a function of the data. It is not a probability distribution over — integrating over does not give 1.
  • Using MLE when you have strong prior information. MLE ignores priors. If you know, from physics or domain knowledge, that a parameter must be in a certain range, use MAP or Bayesian methods instead.

Recap. MLE finds the parameter that makes the observed data most probable. Start with Bayes, drop the denominator (constant), drop the priors (assume equal), and maximize the likelihood. The recipe: identify distribution → write likelihood → take log → differentiate → set to zero → solve.

Bridge. The MLE recipe is abstract until you see it applied to concrete data. The next section (16.6) works through Bernoulli, Binomial, and Poisson MLE problems with real numbers — the exact types of problems you'll face on the exam.

Real-World & Domain Connection. MLE is the workhorse of statistical estimation. Pharmaceutical companies use MLE to estimate drug efficacy rates from clinical trial data (Bernoulli/binomial). Call centers use Poisson MLE to estimate arrival rates and staff accordingly. Insurance companies use Normal MLE to model claim amounts. The central limit theorem guarantees that MLE estimates are approximately Normal for large samples, which is why confidence intervals and hypothesis tests — the topics of sections 16.7-16.8 — are built on MLE estimates.

16.6 MLE Worked Examples

Hook. The MLE recipe in section 16.5 is abstract — "write the likelihood, take log, differentiate, solve." Now you'll see it applied to real data across three distributions. Each example follows the same six steps, but the details change with the distribution. Master these patterns and you can handle any MLE problem on the exam.

16.6.1 Bernoulli — Bike Helmets (Flaw Detection)

A sample of 10 new bike helmets is tested. The 1st, 3rd, and 10th helmets are flawed. The rest are not. Assume the flaw status follows a Bernoulli distribution. Find the MLE for , the probability that a helmet is flawed.

Step 1 — Define the random variables. Let if helmet is flawed, otherwise.

Three flawed helmets (1s), seven non-flawed helmets (0s). So , .

Step 2 — Write the Bernoulli likelihood. A single Bernoulli observation has probability:

For 10 independent observations, the joint likelihood is the product:

Since each is either 0 or 1, this product collapses:

The professor: "Now we need to find what is the maximum value — optimize the maximum likelihood."

Step 3 — Take the log. Products become sums:

Step 4 — Differentiate.

Step 5 — Set to zero and solve.

Step 6 — (Optional) Second derivative check.

At : both terms are negative, so — confirmed maximum.

Answer: The MLE for the flaw probability is .

Sense-check. 3 out of 10 helmets were flawed. The MLE is the sample proportion , exactly what common sense would suggest. For Bernoulli/Binomial, MLE always equals the sample proportion.

16.6.2 Binomial MLE — Derivation

Derivation. For a binomial distribution with trials and successes, the probability mass function is:

The binomial coefficient does not depend on , so it drops out when we differentiate the log-likelihood. Using for the parameter:

The MLE for the binomial parameter is the sample proportion: .

16.6.3 Poisson MLE — Derivation

Derivation. For independent Poisson observations :

The MLE for the Poisson rate is the sample mean.

16.6.4 Poisson Worked Example — Defective Hard Drives

The number of defective hard drives produced daily follows a Poisson distribution. Counts from 10 days: 7, 3, 1, 2, 3, 4, 2, 1, 2, 1. The sum is .

Step 1 — Compute the MLE. . As the professor said: "The maximum likelihood estimate for lambda is nothing but X bar."

Step 2 — Use the estimate to compute probabilities. Find , the probability of 0 or 1 defects on a given day:

Using :

Sense-check. The average is 2.6 defects per day. Getting 0 or 1 defects is below average — about a 27% chance, which is plausible.

16.6.5 Binomial 0/1 Sample — MLE for

Consider six independent observations, each either 0 or 1: . Here and . Find the MLE for .

Step 1 — Count. Two ones, four zeros. So , .

Step 2 — Write the likelihood. Each observation contributes if 0 and if 1:

Step 3 — Take log.

Step 4 — Differentiate and set to zero.

Sense-check. 2 successes out of 6 trials gives . The MLE is the sample proportion, as expected.

Exam warning from the professor. If a solved example similar to this appears in the exam but with different numbers, do not copy blindly. "You will get zero marks if you submit a solution that does not match the actual data in your exam question." Always re-derive with the numbers in your specific question. The method is the same — the numbers change.

16.6.6 Student Questions and Answers

Q: For the Poisson example where the counts are 7, 3, 1, 2, ... — is the sum 26 and divided by 10 gives 2.6?

A: Yes. The sample mean is the MLE for . Then you use in the Poisson formula to compute and , and add them.

Assumptions & Scope. All MLE derivations above assume independent observations. For the Poisson, the data must be counts (non-negative integers) — MLE for doesn't make sense for negative or continuous data. For Bernoulli/Binomial, observations must be binary. The MLE for the Normal distribution (, ) follows the same log-differentiate-solve pattern but requires two partial derivatives.

Visual Intuition for MLE. For the Bernoulli bike-helmet example, imagine plotting against from 0 to 1. The curve starts at 0 (at ), rises to a peak at , then falls back to 0 (at ). The peak is sharp but not symmetric — the curve is taller on the left side (fewer successes) than the right. The log-likelihood has the same peak location but is more symmetric and easier to differentiate.

Pitfalls.

  • Forgetting the log step. Directly differentiating with the product rule is messy and error-prone. Always take the log first.
  • Dropping the binomial coefficient too early. In the binomial MLE, is a constant with respect to , so it vanishes in the derivative. But you must recognize that it's there in the likelihood function — it just doesn't affect the maximization.
  • Treating as unknown in binomial MLE. In this course, is known (the number of trials). Only is estimated. MLE for unknown is a much harder discrete optimization problem.
  • Copying solutions without checking numbers. The professor explicitly warned against this — your exam data will differ. Re-derive every time.

Recap. MLE for Bernoulli/Binomial gives (sample proportion). MLE for Poisson gives (sample mean). The recipe is always: write the product likelihood, take log, differentiate, set to zero, solve. The pattern is the same across distributions.

Exam note. You can expect an MLE numerical: a small dataset plus a distribution (Bernoulli/Binomial/Poisson). Write the likelihood from the data, take log, differentiate, solve for the parameter. The Bernoulli bike-helmets problem and the binomial 0/1 sample are the representative types.

Bridge. MLE gives you point estimates — single best values for parameters. But estimates come with uncertainty. The next topic — hypothesis testing (section 16.7) — uses those estimates to answer the question: "Is this parameter value consistent with the data, or should we reject it?"

Real-World & Domain Connection. MLE is implemented in every statistical software package. When you run glm() in R or statsmodels in Python, the default fitting method is MLE. Manufacturing quality control uses Bernoulli MLE to estimate defect rates from inspection samples (the bike-helmet problem is a miniature version of real factory quality assurance). Call centers use Poisson MLE to forecast call volumes and schedule staff. In clinical trials, binomial MLE estimates drug response rates, directly feeding into the hypothesis tests that determine whether a new treatment is approved.

16.7 Hypothesis Testing — Model Identification and Decision Framework Review

Hook. You're handed an exam problem: "A manufacturer claims their brake pads last more than 920 hours. A sample of 44 pads is tested at 5% significance..." What test do you use? Z or t? One-tailed or two-tailed? Means or proportions? If you freeze here, the rest of the problem — no matter how well you compute — is wrong. The professor's main message: identify the model first, then compute. The formulas are available; knowing which one to pick is the skill.

16.7.1 The Core Skill — Identifying Which Model Applies

Intuition. Think of hypothesis testing like a toolbox. You have a Z-test wrench, a t-test screwdriver, a proportion test pliers. The problem describes a job — "tighten this bolt." Your first task isn't tightening; it's picking the right tool. The professor's four questions are your tool-identification checklist.

The professor emphasized: "You should not waste your time in referring which model. You should not get confused. Otherwise all the formulas are available. Tables are available."

Every hypothesis testing problem reduces to four binary decisions:

  1. Means or proportions? If the data is averages/measurements (hours, weight, price) → means. If it's percentages/counts out of a total (defect rate, survival rate) → proportions.
  2. One population or two? One sample → one-population test. Comparing two groups (brand A vs brand B, before vs after) → two-population test.
  3. Large sample or small? For means: → large (Z). For two means: → large (Z). Otherwise → small (t).
  4. One-tailed or two-tailed? Directional claim (greater than, less than, superior) → one-tailed. No-direction claim (different, equal, change) → two-tailed.

Once you answer these four, the formula and critical value follow mechanically.

16.7.2 The Decision Tree for Choosing a Test

The complete decision framework.

For means:

ScenarioSample Size CriterionTestTest StatisticCritical Value
One meanZ-testZ-table
One meant-testt-table, df
Two meansZ-testZ-table
Two meanst-testPooled or unpooled tt-table, df

For proportions (always large sample, always Z):

ScenarioTest Statistic
One proportion
Two proportions

Paired t-test: For before-and-after data — same individuals measured twice. Examples: drug efficacy (before vs after treatment), training program effectiveness (pre-test vs post-test). The test works on the differences , treating them as a single sample and testing .

16.7.3 Critical Rule — Two-Means Sample Size

The rule students miss most. "We should not see the sample sizes separately." For two means, compute:

If this → Z-test. If → t-test.

  • , : each is below 30 individually, but Z-test.
  • , : t-test, df = 18.

The comes from losing one degree of freedom per sample for estimating each mean. This rule catches many students off guard.

16.7.4 Degrees of Freedom for t-Tests

Test TypeDegrees of Freedom
One sampledf
Two samplesdf

To use the t-table: find the row matching your df, then the column matching your (and tail type). If (one sample), df = 19 — look up row 19.

16.7.5 Z Critical Values Quick Reference

Memorize or keep a reference card. These six values cover most exam problems:

One-Tailed Two-Tailed
0.01 (1%)
0.05 (5%)
0.10 (10%)

For one-tailed: the sign matches the direction. Right-tailed → positive critical value. Left-tailed → negative. For two-tailed: both values are rejection regions.

"If anything other than these values is needed, then you have to reference the full Z-table and figure it out."

16.7.6 Hypothesis Formulation Rules

The iron rule: must always contain equality. "H naught always comes with equality symbol."

Claim WordingTail Type
"The mean exceeds 920"Right-tailed
"The mean is less than 750"Left-tailed
"The average delivery time is 3 days"Two-tailed
"There is a significant difference between brands"Two-tailed
"Product A is superior to product B"Right-tailed
"Product A lasts 34 hours more than B"Right-tailed

The claim always goes to unless it already contains pure equality (=), in which case it goes to and gets .

16.7.7 "Do Not Reject" vs "Accept"

Statisticians prefer "do not reject " over "accept ." The logic: failing to reject is not the same as proving it true — you just don't have enough evidence against it. For this course's exams, "accept " or "reject " is fine. Structure your conclusion: (1) state the decision about (accept/reject), then (2) state what this means for the original claim.

"Reject H naught means accept H1. The conclusion is first: accept H naught or reject H naught."

16.7.8 Hypothesis Testing — Step-by-Step Procedure

The complete hypothesis test workflow:

  1. Identify the model. Answer the four questions: means/proportions? one/two populations? large/small sample? one-tail/two-tail?
  2. State hypotheses. (with equality) and .
  3. Determine the critical value. From the Z-table or t-table at the given .
  4. Compute the test statistic. Plug sample data into the formula.
  5. Compare and decide. If test statistic falls in the rejection region → reject . Otherwise → do not reject .
  6. State the conclusion. About first, then about the original claim.

Assumptions & Scope.

  • Z-tests assume known population standard deviation . In practice, is rarely known — but exam problems typically provide it for Z-test scenarios. If only the sample standard deviation is given and , use the t-test.
  • Central Limit Theorem (CLT): Z-tests rely on the CLT — the sampling distribution of is approximately Normal when , regardless of the population shape. Below 30, you need the population to be approximately Normal to use t.
  • Independence: All tests assume observations are independent. Paired t-tests are the exception — they handle dependent (paired) data.
  • Proportions: Require large samples for the Normal approximation. Rule of thumb: and . If these fail, use exact binomial tests instead.

Visual Intuition. Draw a Normal curve centered at the null value. Shade the rejection region(s) at the tail(s). The test statistic is a point on the x-axis. If it falls in the shaded zone, reject . For a right-tailed test at , shade the rightmost 5% of the curve (starting at ). For a two-tailed test at , shade the leftmost 2.5% and rightmost 2.5% (starting at and ). The critical value is the boundary of the shaded zone.

Pitfalls.

  • Checking each sample separately for the two-means rule. Don't. Always compute . Two samples of 20 each → Z, not t.
  • Putting the inequality in . always has equality (=). If the claim is "greater than," that goes to . If you reverse this, your entire test is backwards.
  • Using the wrong tail. "Is different from" → two-tailed. "Is greater than" → right-tailed. "Is less than" → left-tailed. A common mistake: using a two-tailed test when the claim is directional, which doubles your critical value and makes it harder to reject.
  • Forgetting that proportion tests always use Z. There is no "t-test for proportions" in this course. Proportions have their own Z formula with .
  • Stopping after computing the test statistic. You must compare it to the critical value and state a conclusion about . A test statistic without a decision is incomplete.

16.7.9 Student Questions and Answers

Several students asked about the two-means hypothesis formulation rule.

Q: In some questions about the test for equality of two means, the claim says "less than or equal to" — but we still set as equality and test difference as zero. Is that the rule?

A: Yes. always contains equality. If the claim is "the average life of product A is superior to product B," that translates to . But becomes (equality). is . If the claim says "product A lasts 34 hours more than product B," then and . The actual claimed difference replaces 0, but still has equality.

Q: How do I find the degrees of freedom when the sample size is less than 30 for a single sample? What do I look up in the t-table?

A: For a single sample, df = . If , then df = 19. In the t-table, find the row for 19, then the column for your alpha value. That gives the critical t-value. For two samples, df = .

Q: In the two-means Z formula, appears. What if and are not individually given?

A: You do not need individual and values. Under , the difference is just 0. If says the difference is some specific value (like 30), then . The formula uses the difference, not the individual values.

SymbolMeaningDomain
Sample meanAny real number
Population meanAny real number
Population standard deviation
Sample standard deviation
Sample size
Sample proportion
Population proportion (under )
Level of significanceTypically 0.01, 0.05, 0.10
dfDegrees of freedom

Recap. Hypothesis testing is a six-step workflow: identify the model (means/proportions, one/two populations, large/small, tail direction) → state (with equality) and → find critical value → compute test statistic → compare → conclude. The two-means sample size rule () and the Z critical values (1.645, 1.96, 2.58) are the highest-frequency traps.

Exam note. This is the most important exam skill — not computing, but identifying. "Just have a glance — which model? How to work?" Know the Z critical values for 1%, 5%, 10%. always has equality. The two-means rule: , not individual samples.

Bridge. The framework is the map. The next section (16.8) walks the territory — eight fully worked hypothesis testing examples that apply every cell of the decision tree.

Real-World & Domain Connection. Hypothesis testing is the engine of evidence-based decision making. Pharmaceutical companies use two-sample t-tests to compare new drugs against placebos. Manufacturing plants use one-sample Z-tests to verify that production lines meet specifications. Marketing teams use proportion tests to measure campaign effectiveness. Election pollsters use two-proportion Z-tests to compare candidate support across demographics. Every time you read "statistically significant" in a study, a hypothesis test — built on this exact framework — is behind that claim.

16.8 Worked Hypothesis Testing Examples — Means and Proportions

Hook. Section 16.7 gave you the decision framework — the map. Now you'll walk the territory. Seven worked examples spanning one-mean, two-mean, sampling distribution, and proportion problems. Each one applies the same six-step workflow: identify → state hypotheses → find critical value → compute test statistic → compare → conclude.

16.8.1 Example A — Delivery Time (One Mean, Two-Tailed, Large Sample)

A company claims the average delivery time is 3 days. A random sample of 50 deliveries is taken. Sample mean days, population standard deviation days. Test the claim at 5% significance.

Step 1 — Model identification. One mean. → large sample → Z-test. Claim: "is 3 days" — pure equality, no direction → two-tailed.

Step 2 — State hypotheses.

Step 3 — Critical value. , two-tailed → .

Step 4 — Test statistic.

Step 5 — Compare. — falls in the rejection region.

Step 6 — Conclude. Reject . The claim that the average delivery time is exactly 3 days is not supported by the data. The sample suggests the true mean is higher.

Sense-check. The sample mean (3.2) is fairly far from the claimed 3.0 — about 2.36 standard errors away. With 50 observations, that's enough evidence to reject.

16.8.2 Example B — Brake Pads (One Mean, Right-Tailed, Large Sample)

A manufacturer claims the mean life of their brake pads exceeds 920 hours. A random sample of 44 pads is tested: hours, hours. Test at 5%.

Step 1 — Model identification. One mean. → Z-test. Claim: "exceeds 920" → right-tailed.

Step 2 — State hypotheses.

Step 3 — Critical value. , right-tailed → .

Step 4 — Test statistic.

Step 5 — Compare. → reject .

Step 6 — Conclude. Accept the claim. The data supports that the mean life exceeds 920 hours (at 5% significance).

Sense-check. The sample mean (935) is 15 hours above the claimed threshold, about 1.84 standard errors. That's enough at one-tailed, but it would fail a two-tailed test at 1% (where ).

16.8.3 Example C — Light Bulbs (One Mean, Left-Tailed, Large Sample)

The claim: the mean life of light bulbs is less than 750 hours. Sample: , hours, hours. Test at 1%.

Step 1 — Model identification. One mean. → Z-test. Claim: "less than 750" → left-tailed.

The professor explained the hypothesis placement: "Less than 750 — we can't take it as null hypothesis because equality is not there. Push it as alternative hypothesis. Null hypothesis becomes equality."

Step 2 — State hypotheses.

Step 3 — Critical value. , left-tailed → .

Step 4 — Test statistic.

Step 5 — Compare. — the test statistic is NOT more extreme than the critical value. Do not reject .

Step 6 — Conclude. At 1% significance, there is not enough evidence to support the claim that the mean life is less than 750 hours. The sample mean (740) is lower, but the evidence isn't strong enough at the strict 1% level.

Sense-check. At (left-tailed, ), we would reject . The stricter alpha (1% vs 5%) changes the conclusion — a perfect illustration of how significance level drives the decision.

16.8.4 Example D — Two Brands (Two Means, Two-Tailed, Large Sample)

Two brands are compared. Sample data: Brand 1: , , . Brand 2: , , . Is there a significant difference at 5%? At 1%?

Step 1 — Model identification. Two means. → Z-test. Claim: "significant difference" → two-tailed.

Step 2 — State hypotheses.

Step 3 — Critical values.

  • At 5%:
  • At 1%:

Step 4 — Test statistic.

Step 5 — Compare.

  • At 5%: → reject .
  • At 1%: → reject .

Step 6 — Conclude. There is a significant difference between the two brands at both 5% and 1% significance levels. Brand 1's mean is significantly higher.

Sense-check. The difference is 5 units within a standard error of about 1.68 — that's nearly 3 standard errors. Strong evidence. At both common alpha levels, we reject.

16.8.5 Example E — Sampling Distribution of the Mean

Vehicles have a population mean age months and months. A random sample of vehicles is taken. Find the probability that the sample mean age falls between 90 and 100 months.

Step 1 — Model identification. Sampling distribution of the mean. → CLT applies → use Z.

Step 2 — Convert bounds to Z-scores.

For :

For :

Step 3 — Compute the probability.

Using the symmetry rule :

From the Z-table: , .

Sense-check. About 92% chance the sample mean falls in a roughly band around the population mean — plausible for .

16.8.6 Example F — Proportion: Cancer Drug Efficacy

60% of cancer patients are cured by a new drug (). In a random sample of patients, what is the probability that 50% or more will be cured?

Step 1 — Model identification. Single proportion. is large. Sampling distribution of .

Step 2 — Compute Z for .

Compute the denominator:

The professor rounded this to .

Step 3 — Find the probability.

Since the Normal distribution is symmetric: .

From the Z-table: . So:

Sense-check. There's about a 98.75% chance that 50% or more of 120 patients will be cured, even though the true cure rate is only 60%. The large sample size makes it very likely that stays close to 0.60.

16.8.7 Example G — Disease Survival (One Proportion, Right-Tailed)

The claim: 85% of people survive a certain disease (). A sample of people finds 18 survivors (). Does this support that the survival rate is more than 85%?

Step 1 — Model identification. Single proportion. The professor clarified: "85% is population proportion — that is the generalized one. 18 out of 20 is sample proportion." Claim: "more than 85%" → right-tailed.

Step 2 — State hypotheses.

Step 3 — Critical value. Assuming : right-tailed .

Step 4 — Test statistic.

Step 5 — Compare. → do not reject .

Step 6 — Conclude. The sample (18/20 = 90%) does not provide strong enough evidence that the true survival rate exceeds 85%. The difference could easily be due to random chance with only 20 patients.

Note on sample size: is small. Check and — the second value is below 5, so the Normal approximation is borderline. In practice, you'd use an exact binomial test. For exam purposes at this level, the Z-test approach is acceptable.

Sense-check. Going from 85% to 90% with only 20 patients is just 1 extra survivor above the expected 17. That's weak evidence — the non-rejection makes sense.

16.8.8 Comparison — Hypothesis Testing Patterns Summary

ExampleTypeTailDecision
A: DeliveryOne meanTwo505%2.36Reject
B: Brake padsOne meanRight445%1.6451.842Reject
C: Light bulbsOne meanLeft361%Do not reject
D: Two brandsTwo meansTwo40+405%/1%/2.97Reject both
E: VehiclesSampling distSymmetric36
F: Cancer drugProportionSymmetric120
G: DiseaseOne proportionRight205%1.6450.627Do not reject

16.8.9 Student Questions and Answers

Q: For the sampling distribution problems, the formula is the same whether or , right?

A: Yes. Both are greater than 30, so both use the Z distribution. The central limit theorem says: whenever the sample size reaches 30 or more, you can use the Z distribution. This holds regardless of the population distribution. That is the clue — central limit theorem.

Q: How do we tell whether the given proportion is the sample proportion or population proportion ?

A: Look at the phrasing. The generalized statement is population — "85% of people survive" is . The specific data from the sample is . 20 people were selected, 18 survived — so . If it is a broad claim about the whole population, it is . If it is from the data collected in the problem, it is .

Q: What if the level of significance is not mentioned in the exam question?

A: Pick your own . Choose any standard value — 1%, 5%, or 10% — and state it. Answer accordingly. Do not ask the exam supervisor or proctor. You can choose any alpha value and write your own conclusion. There is no need to ask anyone.

16.8.10 Exam Strategy Tips

  • Identify the model first. "Just have a glance — which model? How to work?" Before computing, classify the problem.
  • All formulas are available. In an open-book exam, don't memorize — know which formula to use and when.
  • Keep the Z critical values table handy. 1%, 5%, 10% for both tails cover most problems.
  • For t-tests, use the full t-table. Row = df, column = . No shortcut.
  • Conclusion starts with . "Accept or reject ." Then translate to the original claim.
  • Tomorrow's session: more testing problems, ANOVA overview, time series review, correlation summary.

Pitfalls.

  • Using Z when you should use t. If for one sample or for two samples, and is unknown, use t — not Z. The t-distribution has fatter tails and a different critical value.
  • Wrong tail for the claim. "More than" → right-tailed. "Less than" → left-tailed. "Different" → two-tailed. Getting this wrong flips your entire rejection region.
  • Forgetting to divide by in the denominator. The standard error is , not just . Without the , your test statistic is too small and you'll rarely reject.
  • Not stating a conclusion. Computing the test statistic is not enough. Compare to critical value, state "reject " or "do not reject ," then interpret.
  • Misidentifying vs . is the population value (from the claim). is computed from the sample data.

Recap. Seven worked examples span the full hypothesis testing landscape: one-mean Z (delivery, brake pads, light bulbs), two-mean Z (two brands), sampling distribution (vehicles), proportion Z (cancer drug), and one-proportion test (disease survival). The pattern is identical: identify → hypothesize → critical value → test statistic → compare → conclude.

Exam note. If is not given, pick your own (1%, 5%, or 10%) and state it. Know the Z critical values. Always compute for two means. And never copy a solved example blindly — verify the numbers match your exam question.

Bridge. Tomorrow's session extends this framework to ANOVA (comparing more than two means), time series analysis, and correlation — all built on the same hypothesis testing logic.

Real-World & Domain Connection. These examples mirror real business decisions. The delivery time test (Example A) is what logistics companies run daily to monitor service level agreements. The brake pad test (Example B) is a miniature version of automotive safety compliance testing — regulators require statistical evidence that components meet specifications. The two-brands comparison (Example D) is marketing A/B testing. The cancer drug proportion (Example F) is a simplified clinical trial power calculation. Every example maps to a real decision someone gets paid to make.

Exam Guidance Summary

Exam note — GMM numericals. Expect a problem with mixing coefficients, means, and variances for two Gaussian components and a data point . Compute the responsibility (posterior probability) for each component using the Bayes-like formula from section 16.3. No Z-table needed — just exponentials. Classify the point to the component with higher responsibility. The examples in section 16.4 are the template.

Exam note — MLE numericals. A small dataset plus a distribution (Bernoulli, Binomial, or Poisson). Write the likelihood function from the data, take log, differentiate, set to zero, solve for the parameter. The Bernoulli bike-helmets problem () and the binomial 0/1 sample problem () from section 16.6 are the representative types. Do not copy solutions blindly — verify the numbers in your exam question match before using a solved example.

Exam note — Hypothesis testing. The most common question type. You must identify: (a) means or proportions, (b) one or two populations, (c) large or small sample, (d) one-tailed or two-tailed. Then write (always with equality) and correctly. Compute the test statistic, compare to the critical value, and state your conclusion about first. The worked examples in section 16.8 cover every pattern.

Exam note — Critical values and rules to memorize.

  • Z critical values: 1% one-tail , 1% two-tail ; 5% one-tail , 5% two-tail ; 10% one-tail , 10% two-tail .
  • Two-means sample size rule: compute . If → Z; if → t. Never check each sample separately.
  • Degrees of freedom: one sample df = ; two samples df = .
  • If is not given, pick your own (1%, 5%, or 10%) and state it explicitly.
  • Tomorrow's topics: More hypothesis testing problems, ANOVA overview, time series review, correlation summary. Bring your doubts — the professor will spend time on Q&A.

Key Industry Applications

  • Gaussian Mixture Models power soft clustering, density estimation, and anomaly detection wherever clusters overlap. Customer segmentation that captures mixed buying behaviors — a shopper who buys both luxury and discount items isn't forced into one bucket. Financial return modeling from mixed market regimes (bull, bear, sideways). Background subtraction in video surveillance, where each pixel's color over time is a GMM and anomalies trigger motion alerts. GMMs are the standard when you need probabilistic rather than hard binary cluster assignments.
  • The EM algorithm is a general optimization technique for any problem with latent variables — not just GMMs. Hidden Markov models in speech recognition use EM to learn phone-to-acoustic mappings. Missing data imputation in clinical trials uses EM when patients drop out. Latent Dirichlet Allocation for topic modeling uses EM to discover themes in document collections. Wherever you have "I can see the data but not the hidden labels," EM is the standard solution.
  • Maximum Likelihood Estimation is the default parameter estimation method across all of statistics. Manufacturing quality control uses Bernoulli MLE to estimate defect rates from inspection samples. Call centers use Poisson MLE to forecast call volumes and schedule staff. Insurance actuarial models use Normal MLE for claim amounts. Reliability engineering uses MLE to estimate component lifetimes from failure data. Every glm() in R and statsmodels fit in Python uses MLE under the hood.
  • Hypothesis testing is the engine of evidence-based business decisions. Comparing two suppliers (two-means Z-test). Validating product performance claims (one-mean Z-test). Measuring marketing campaign conversion rates (proportion test). Evaluating training program effectiveness with before-and-after measurements (paired t-test). Every "statistically significant" result in a business report or scientific paper traces back to the hypothesis testing framework covered in this lecture.

ISM Lecture 16 notes · Gaussian Mixture Models, Maximum Likelihood Estimation, and Hypothesis Testing

Introduction to Statistical Methods· postgraduate· 2026-07-07

Sections Breakdown

1Gaussian Mixture Models — Recap and Mathematical Representation

Weighted sum of Gaussian distributions, hard vs soft clustering, mixing coefficients, covariance matrix

2Expectation Maximization (EM) Algorithm for GMM

E-step and M-step iteration, responsibility computation, parameter updates, local maxima

3GMM — Posterior Probability (Responsibility) Computation

Bayes' theorem mapping to GMM, K-component responsibility formula

4GMM Worked Numerical Examples

Two full examples computing responsibilities for given parameters and classifying data points

5Maximum Likelihood Estimation (MLE) — Foundations

From Bayes to MLE, six-step recipe, likelihood and log-likelihood functions

6MLE Worked Examples

Bernoulli bike helmets, Binomial derivation, Poisson defective hard drives, Binomial 0/1 sample

7Hypothesis Testing — Model Identification and Decision Framework

Means vs proportions, one vs two populations, Z vs t, one-tail vs two-tail, H0 equality rule

8Worked Hypothesis Testing Examples — Means and Proportions

Seven examples: delivery time, brake pads, light bulbs, two brands, sampling distribution, cancer drug, disease survival

9Exam Guidance Summary

Exam tips for GMM numericals, MLE numericals, hypothesis testing identification, critical values

10Key Industry Applications

Real-world uses of GMMs, EM, MLE, and hypothesis testing across industries

Postgraduate students in statistics and data science

Exam Revision Notes

Below is the distilled, exam-ready core of this lecture. Every entry is built from the full textbook notes above. Use this section for rapid review — but if something doesn't make sense, go back to the full explanation in the main content.

Gaussian Mixture Models

Must-know: A GMM is a weighted sum of K Gaussian components. Each component has a mixing coefficient pi_k, mean mu_k, and covariance Sigma_k. Soft clustering gives probabilities instead of hard assignments.

⚠ Top pitfall: Forgetting that mixing coefficients must sum to 1 — if you initialize without normalizing, the GMM is not a valid probability distribution.

Self-check: What are the three parameter families per component in a GMM?

Connects to: EM Algorithm, Responsibility Computation, Soft Clustering

EM Algorithm for GMM

Must-know: EM alternates between E-step (compute responsibilities using current parameters) and M-step (update parameters using responsibilities). It finds a LOCAL maximum of the likelihood — run multiple times with different starts.

⚠ Top pitfall: Thinking EM gives the global optimum — it doesn't. Always run multiple random initializations and pick the highest final likelihood.

Self-check: What's the difference between exam mode (parameters given, just compute responsibilities) and implementation mode (iterate E and M until convergence)?

Connects to: GMM, Responsibility, MLE

GMM Responsibility (Posterior Probability)

Must-know: Responsibility is the posterior probability that component k generated point x. It's Bayes' theorem: prior = pi_k (mixing coefficient), likelihood = N(x|mu_k, sigma_k^2), denominator = total GMM density.

⚠ Top pitfall: Neglecting the mixing coefficient — responsibility is NOT just N1/(N1+N2). Multiply by priors pi_k. Also forgetting the 1/(sigma*sqrt(2*pi)) normalizing factor in the Gaussian density.

Self-check: Why must the responsibilities for a single data point sum to 1 across all components?

Connects to: Bayes' Theorem, EM E-step, GMM

Maximum Likelihood Estimation

Must-know: MLE finds the parameter that makes observed data most probable. Recipe: identify distribution → write likelihood (product) → take log (sum) → differentiate → set to zero → solve. Start from Bayes, drop denominator (MAP), drop priors (MLE).

⚠ Top pitfall: Maximizing L(theta) directly instead of log L(theta). Products become astronomically small; the log prevents numerical underflow and makes differentiation tractable.

Self-check: What are the three logical steps from Bayes' theorem to MLE?

Connects to: Bernoulli MLE, Binomial MLE, Poisson MLE

Bernoulli/Binomial MLE

Must-know: For Bernoulli/Binomial, MLE of p = k/n (sample proportion). Write likelihood as p^k * (1-p)^(n-k), take log, differentiate, solve. The binomial coefficient drops out during differentiation.

⚠ Top pitfall: Forgetting the log step — differentiating p^3(1-p)^7 with the product rule is messy. Always take log first to turn the product into a sum.

Self-check: In the Bernoulli bike-helmets problem (3 flaws out of 10), what is the likelihood function and why does the MLE equal 0.30?

Connects to: MLE, Poisson MLE, Hypothesis Testing

Poisson MLE

Must-know: For Poisson, MLE of lambda = X-bar (sample mean). The factorial terms x_i! drop out during differentiation since they don't depend on lambda.

⚠ Top pitfall: Using Poisson MLE for non-count data — Poisson only applies to non-negative integers. MLE for lambda doesn't make sense for negative or continuous data.

Self-check: Given daily defect counts 7,3,1,2,3,4,2,1,2,1, what is the MLE for lambda and how do you compute P(0 or 1 defects)?

Connects to: MLE, Bernoulli MLE, Distribution Modeling

Hypothesis Testing Framework

Must-know: Identify the model FIRST: (a) means or proportions, (b) one or two populations, (c) large (n>=30 → Z) or small (n<30 → t), (d) one-tailed or two-tailed. H0 ALWAYS has equality. Two-means rule: compute n1+n2-2, NOT individual samples.

⚠ Top pitfall: Checking each sample separately for two-means rule. Always compute n1+n2-2. Two samples of 20 each → 38 >= 30 → Z-test, NOT t-test.

Self-check: For a claim 'the mean exceeds 920', write H0 and H1 and state the tail type.

Connects to: Z-test, t-test, Proportion Test, MLE

Z-Test and Proportion Test Workflow

Must-know: Proportion tests ALWAYS use Z, never t. Memorize Z critical values: 5% one-tail ±1.645, 5% two-tail ±1.96; 1% one-tail ±2.33, 1% two-tail ±2.58. If alpha not given, pick your own (1%, 5%, or 10%) and state it.

⚠ Top pitfall: Stopping after computing the test statistic. You must compare it to the critical value and state a conclusion about H0 first, then interpret for the original claim.

Self-check: A sample of 20 patients shows 18 survive (p-hat=0.90) vs claimed P=0.85. With Z=0.627 at alpha=0.05, what's the decision and why?

Connects to: Hypothesis Testing, MLE, Sampling Distribution

Was this lecture useful?

Loading comments…
🤖

BitsNotes AI Assistant

Subject Notes Assistant

Configure AI Chat

Choose how to access the chatbot
Have your own API key?

Switch to "Bring Your Own Key" tab above for unlimited access with any OpenAI-compatible provider.

🔑 Enter API key above to fetch live models from provider, or enter model name manually.
OpenAI-Compatible API Support

Choose any provider preset (Gemini, DeepSeek, Kimi, GLM, MiniMax, Qwen, OpenAI, Groq, Ollama, etc.) or enter a custom endpoint URL.

Security & Privacy First

Your API key is sent directly from your browser to your specified provider. BitsNotes servers never store or see your key.