TECHNOLOGIESTieInn Technologies

Sampling and the central limit theorem

Statistics · 13 questions

Short notes

Key idea

We study a sample to learn about a population. The central limit theorem (CLT) says that the means of many random samples form a roughly normal distribution around the true mean, whatever the data's shape, once samples are big enough (about 30+).

Syntax

  • Standard error of the mean: SE = SD / √n.
  • 95% confidence interval: sample mean ± 1.96 × SE.
  • Simple random, stratified (sample within groups), cluster and systematic sampling.
se = x.std() / len(x) ** 0.5
low, high = x.mean() - 1.96 * se, x.mean() + 1.96 * se

Example

400 orders, mean ₹850, SD ₹400. SE = 400 / 20 = 20. The 95% interval is 850 ± 39: about ₹811 to ₹889 for the average of all orders.

Traps

  • Bigger samples shrink the SE only by √n: four times the data halves the error.
  • A biased sample stays biased however big it is (only surveying app users, for example).
  • The CLT is about means of samples, not the raw data becoming normal.
  • A 95% interval doesn't contain 95% of the data; it's about where the true mean probably lies.

Want the full lesson with step-by-step examples, a project and a certificate? Statistics course, ₹120 →

Questions

Open in Code Lab5 free questions
5 questions

    Sampling and the central limit theorem

  1. Question 1easy

    You survey customers through a pop-up in your app to estimate satisfaction of all customers. What's the main risk?

  2. Sampling and the central limit theorem

  3. Question 2medium

    To cut a survey's margin of error in half, how much bigger must the sample be?

  4. Sampling and the central limit theorem

  5. Question 3medium

    Order values are strongly right-skewed. You take many random samples of 100 orders and plot each sample's mean. What shape do you expect?

  6. Sampling and the central limit theorem

  7. Question 4medium

    What does this print?

    import math
    std, n = 3000, 100
    print(std / math.sqrt(n))
  8. Sampling and the central limit theorem

  9. Question 5hard

    Compute order totals (sum of quantity * unit_price per order). Store a tuple (low, high) in result: the 95% confidence interval for the mean order total, mean ± 1.96 × SE, each rounded to 2 decimals.

    The tables are ready as DataFrames with the same names. Store your answer in result.

    Tables

8 more questions on this topic, with hints, and tests

Sign up free for 21 days of every question and test.