1. The t Test for One or Two Means

In the bottling example we knew the population standard deviation. What if the only spread we have comes from our sample? We will see why that changes the reference curve. First, test one mean against a benchmark. Then compare two independent groups and see when it makes sense to combine their estimates of spread.

2. What changes when we estimate the spread?

The distance from the benchmark is still the observed average minus the target. We can keep the decision logic from the last lesson. The change is how we measure the gap.

With unknown population spread, estimate it from the sample. That makes the denominator vary across repeated samples. In the independent normal model, the resulting score follows Student’s t with sample size minus one degrees of freedom.

3. A small sample needs a wider reference

Estimating the spread makes unusually large scores more common. Compare the solid t curve for five degrees of freedom with the dashed normal curve. The t curve has heavier tails.

To leave the same two and a half percent above a cutoff, t needs a larger score. Increase the sample size in the graph to see this gap shrink. A t table uses the degrees of freedom row and the tail probability column.

4. Build a t score for an average cost

These are parcel costs from a random independent sample. Two dirhams is the sample standard deviation, so the population spread is unknown. The question asks whether the average differs from eighteen in either direction.

The standard error estimate is forty fils. The average is eighty fils above the benchmark, which makes the score two. Read it on the t curve for twenty-four degrees of freedom.

5. Check the decision against the interval

The two tails add to a little more than five percent. That is just above the chosen level, so we do not reject the claim that the average is eighteen.

The confidence interval tells us what sizes of the mean remain plausible. The benchmark lies just inside its lower end. Both comparisons leave the question unresolved at five percent.

6. Use the signed t score for a directional claim

If the business planned to detect only a cost increase, the right tail beyond two is the relevant area. A lower-cost claim needs the opposite tail and the positive score gives little support for it.

A lower observed score would switch the roles of the two one-sided tests. The sign matters because the direction was decided in advance.

7. Check whether the sampling design changes the SE

If the data come from independent normal observations, use the estimated standard error we just used for parcel costs.

If you instead audit a substantial share of one fixed customer list without replacement, account for that sampling fraction. The uncertainty is smaller because more of the list is already known. The adjustment alone does not establish an exact t curve.

8. Try a left-tail t test for delivery time

Below forty-five tells you the direction. Pause to write the claims and identify the standard error. Five minutes is the sample standard deviation, so use the t reference and find the degrees of freedom from the sample size.

The average is two and a half minutes below the benchmark. The estimated standard error is one and a quarter minutes, giving a score of minus two. Read the lower tail with fifteen degrees of freedom. The area is below five percent.

9. From one mean to a difference of means

Earlier, we divided the difference between two independent sample means by its standard error. That gap is still the numerator. When both population standard deviations are known, the normal reference applies.

If the two spreads have to be estimated, use a two-sample t procedure. Welch keeps the two estimates separate. If the setting justifies one common population variance, pooling estimates that common value from both samples.

10. Set up a two-sample Welch t test

These samples represent different suppliers, with independent costs and no matching between them. The buyer asks whether the population means differ. That makes either direction relevant.

Supplier A averages three dirhams and fifty fils more in this sample. The reported standard deviations come from the samples. The different processes give no basis for assuming a common population variance, so use Welch.

11. Estimate each group’s contribution to uncertainty

Divide each sample variance by its own sample size. Add the two contributions because the sample means are independent. Take the square root to get a standard error in dirhams, then measure the gap in those standard errors.

Welch adjusts the degrees of freedom for the different uncertainty in the two estimates. The result can be fractional. Keep all the digits when calculating the probability in software.

12. Make the decision using the Welch reference

The two matching tails add to about seven percent. That exceeds five percent, so the sample does not give enough evidence that the population mean costs differ.

A question chosen in advance about higher costs at supplier A would count only the upper tail. For a lower-cost claim, count the lower tail. These are different questions. The comparison should not change direction after seeing the sample.

13. Pool variances when a common spread is justified

Here the depots use the same process, and the problem assumes one common population variance. The two sample standard deviations can still differ. Both estimates give us information about the same quantity.

Pool the sample variances, weighting each by its own degrees of freedom. Depot A contributes eleven and depot B contributes nine. The result is twenty point zero five in squared minutes.

14. Make the decision using the pooled reference

Each sample mean has its own sample size. Use the pooled variance for each population in the standard error, then divide the five-minute gap by that standard error.

Pooling combines eleven and nine degrees of freedom. With twenty degrees of freedom, the two-sided tail area is below five percent. The data give evidence that the two depots have different mean repair times.
