Inferential Statistics
The agency claims that two-room flats in the city average ₹22 thousand a month. Nobody can survey every flat, so you check a random sample of 100 and find a mean of 20. Is the claim wrong, or did you just get an unlucky sample? Inferential statistics answers that, and the same question decides whether one model really beats another.
The rule
A sample estimates the population; always report how uncertain that estimate is.
- The population is everything you care about: all two-room flats in the city.
- A sample is the part you measured: 100 randomly chosen flats.
- A parameter is the true population value (the real average rent), which you never see.
- A statistic is the sample's version (the sample mean, 20), which you use to estimate it.
A different sample would give a slightly different mean. The standard error measures how much sample means wobble:
With a sample standard deviation and , .
A 95% confidence interval is roughly the estimate plus or minus two standard errors (1.96 to be exact): , so 19 to 21. The method that builds such intervals captures the true mean about 95% of the time.
A hypothesis test asks: if the claim were true, how surprising is our sample? The claimed 22 is standard errors away. The p-value is the probability of a result at least this extreme if the claim were true; four standard errors gives a p-value far below 0.01. That is strong evidence against the claim. Note what a p-value is not: it is not the probability that the claim is true.
In ML, a test-set score is a sample statistic too. Model A scoring 91% and model B 90% on 200 test flats may be pure noise.