"Given a fair coin, what's the chance of seeing 8 heads in 10 flips" and "given that I saw 8 heads in 10 flips, how fair was the coin" use the exact same binomial formula, plugged in two different ways. The first fixes the coin's fairness and asks about possible outcomes, that's a probability. The second fixes the outcome (it already happened) and asks about possible explanations, that's a likelihood. Same formula, same numbers even, but a completely different question being asked of it, and confusing the two is a genuinely common source of statistical mistakes.
This distinction underlies every "fit a model to data" question this curriculum poses: maximum likelihood estimation (the next question in this track) is precisely "find the parameter values that make the DATA YOU ACTUALLY OBSERVED look as likely as possible," which only makes sense once you've separated "probability of data, given parameters" from "likelihood of parameters, given data."
Theory defines the Normal PDF once, then uses it two different ways: as a probability density over data (fixed parameters, varying data), and as a likelihood over parameters (fixed data, varying parameters). Implement the PDF once, a joint-density helper for a fixed parameter, and a likelihood curve that sweeps candidate parameter values against the SAME fixed data.
Implement normal_pdf(x, mean, std), joint_density(x_values, mean, std) and likelihood_curve(x_values, candidate_means, std) against that reasoning. The signatures and docstrings are already in the editor.
normal_pdf must vectorize over x (accept an array, return an array of the same shape).joint_density assumes every entry of x_values is independent, so their joint density is a product, not a sum.likelihood_curve calls joint_density once per candidate mean, holding x_values and std fixed throughout.Open one at a time. Each gives away a little more than the last.
normal_pdf is a direct, vectorized translation of the Gaussian formula, np.exp and np.sqrt handle arrays natively.
joint_density is np.prod(normal_pdf(x_values, mean, std)), one call reusing the function you already wrote.
Click "Run Tests" to test your implementation