Two-Sample Z-Test for Means with Known and Unequal Variances

Objective: to assess the significance of the difference between the means x̄1 and x̄2 of two populations.

Constraints: the variances of the two populations, σ1² and σ2², must be known, and the distributions must be normal.

Problem: In a chemical analysis laboratory, an ammonium standard solution E1 shows greater dispersion in its certificate than standard E2.

The variance σ1² of E1 is 0.001025 ppm, and the variance σ2² of E2 is 0.000485 ppm.

The respective means obtained after analysis of each standard are x̄1=12,08 , with 13 analyses, and x̄2=12,03 ppm, with 10 analyses.

Is there a difference between the two standards with respect to the means obtained?

Hypotheses and alternative hypotheses:

Scenario No. 1: H0: μ1 − μ2 = μ0 and H1: μ1 − μ2 ≠ μ0 — two-tailed hypothesis.
Scenario No. 2: H0: μ1 − μ2 = μ0 and H1: μ1 − μ2 > μ0 — one-tailed hypothesis.

Risk level: α = 0.05, corresponding to 0.025 in each tail for a two-tailed test

The Normal Distribution Critical Values Table For α = 0.05, this gives Z = 1.64 for a one-tailed test and Z = 1.96 for a two-tailed test.

Statistical test:

We consider two populations with means µ1 and µ2 and variances σ1² and σ2². Independent random samples of sizes n1 and n2 are drawn, and the sample means x̄1 and x̄2 are calculated.

µ1-µ2=µ0=0 and Z = 4.43

Conclusion:

Regardless of the scenario, the null hypothesis H0 must be rejected. Only the alternative hypothesis H1 remains valid, and it can therefore be concluded that there is indeed a difference between the means of the standards.

Z-Test for the Means of Two Populations (Known and Equal Variances)

Objective: to assess the significance of the difference between the means x̄1 and x̄2 of two populations.

Constraints: the two populations must have the same known variance σ², and the distributions must be normal.

Problem: in an analytical laboratory, two pieces of equipment are compared to determine whether the calibration of each instrument could lead to a better result.

Thirteen analyses of a standard performed with the first piece of equipment give a result of x̄1 = 12.5 ppm, and ten analyses performed with the second piece of equipment give x̄2 = 12.0 ppm.

The standard deviations between the analyses are identical, with σ = 0.696 ppm.

Is there a difference between the two pieces of equipment with respect to the means obtained?

Hypotheses and alternatives:

Scenario No. 1: H0: μ1 − μ2 = 0 and H1: μ1 − μ2 ≠ 0 (two-tailed hypothesis)
Scenario No. 2: H0: μ1 − μ2 = 0 and H1: μ1 − μ2 > 0 (one-tailed hypothesis)

The Normal Distribution Critical Values Table For α = 0.05, this gives Z = 1.64 for a one-tailed test and Z = 1.96 for a two-tailed test.

Statistical test:

We consider two populations with means μ₁ and μ₂. Independent random samples of sizes n₁ and n₂ are drawn, and the sample means x̄₁ and x̄₂ are calculated.

µ1-µ2=µ0=0 and Z = 1.7

Conclusion:

For Scenario 1 (two-tailed distribution), the Z-test statistic falls between -1.96 and +1.96. The null hypothesis H0 cannot be rejected, and it is highly likely that, with additional samples, the mean x̄₂ would move closer to x̄₁.
For Scenario 2 (one-tailed distribution), the Z-test statistic is greater than 1.64, and the null hypothesis H0 must be rejected. Only the alternative hypothesis H1 remains valid, indicating that the means obtained from the two pieces of equipment are different.

Z-test for comparing two Poisson counts

Objective: To study the significance of the difference between two counts.

Constraints: The test is fairly approximate and assumes that the sample size must be large enough for the normal distribution approximation to be valid.

Problem: A laboratory is equipped with two automated analyzers, which perform respectively n1 = 485 analyses in t1 = 120 min and n2 = 595 analyses in t2 = 135 min.

What can be concluded about the rate of each instrument?

Hypotheses and alternative hypotheses:

Scenario No. 1: H₀: R₁ = R₂ and H₁: R₁ ≠ R₂ (two-tailed hypothesis).

The Normal Distribution Critical Values Table For α = 0.05, this gives Z = 1.96 for a two-tailed test.

Statistical test:

We consider two counts n1 et n2, and the associated count rates with respect to times t1 et t2: R1=n1/t1 et R2=n2/t2.

R1=4.04 R2=4.41 Z = -1.43

Conclusion:

The Z-test value is between -1.96 and +1.96; therefore, the null hypothesis H₀ cannot be rejected, and the frequencies for each piece of equipment cannot be considered significantly different

t-Test on the means of two populations (unknown and equal variances)

Objective: To assess the significance of the difference between the means of two populations.

Constraints: The distributions must be normal.

Problem: Two automatic balances, 1 and 2, are installed on a gas analyzer used for metals analysis. The standard test sample weight is usually 5 grams.

A random sample of n1=n2=12 test portions is taken from each balance. This gives a mean of x̄1 = 4.95 grams, with a sum of squared deviations of s1² = 0.05, and x̄2 = 5.16 grams, with a sum of squared deviations of s2² = 0.08.

What can be said about the balances with respect to the measured weights?

Hypotheses and alternative hypotheses:

Scenario No. 1: H0: μ1−μ2 = 0 and H1: μ1 − μ2≠0 (two-tailed hypothesis)

Risk level: α = 0.05, corresponding to 0.025 in each tail for a two-tailed test

The Table des valeurs critiques pour une distribution de Student gives, for α = 0,05 et ν=n1+n2-2=12+12-2=22 degrees of freedom, therefore t22;0.025=±2,07.

Statistical test:

We consider two populations with means µ1 et µ2. Des échantillons aléatoires indépendants de taille n1 et n2. Independent random samples of sizes n1 et n2 are taken, and the sample means x̄1 et x̄2 are calculated, along with the sums of squared deviations.

The best estimate of the population variance is given by:

s = 0.255

µ1-µ2=0 and t = -2.02

Conclusion:

The t-statistic lies between -2.07 and +2.07; therefore, the null hypothesis H0 cannot be rejected, and the balances show no significant difference between their weighing results.

Welch’s t-test for two population means (unknown and unequal variances)

Objective: To study the significance of the difference between the means of two populations.

Constraints: The test is approximate if the distributions are normal and if the sampling is too large. The test should only be used under the hypothesis µ1=µ2.

Problem: A laboratory needs to acquire a new piece of equipment but lacks the available space. Since it has two identical older pieces of equipment, E1 and E2, one of them will have to be scrapped.

To support its decision, the laboratory decides to perform 2,000 analyses of a blank sample — a solution containing no analyte — on each piece of equipment, and to quantify each value that exceeds a threshold set by the laboratory, corresponding to an erroneous and random value during measurement.

Equipment E1 shows 8 values above the threshold, with a mean x̄1 = 35 ppm and a variance s1²= 100 ppm.
Equipment E2 shows 5 values above the threshold, with a mean x̄2 = 15 ppm and a variance s2²= 200 ppm.

Hypotheses and alternative hypotheses:

Scenario N°1 H0: µ1=µ2 and H1: µ1≠µ2 (two-tailed hypothesis)

Prise de risque: α = 0,05

The Table des valeurs critiques pour une distribution de Student gives, for α = 0,05 et ν=6,5 degrees of freedom, therefore t6.5;0.025=±2,41

Statistical test:

Consider two populations with means µ1 et µ2. Independent random samples of sizes n1 and n2 are drawn, and the sample means x̄1 and x̄2 are calculated, along with the variances s1² et s2².

t= 2.76

The t-value does not fall between −2.41 and +2.41; therefore, the null hypothesis H₀ must be rejected, and it is preferable to scrap equipment E1.

Paired t-Test for the Means of Two Populations (Paired Comparison Method)

Objective: To assess the significance of the difference between two means, µ1 et µ2, from two populations.

Constraints: The observations for the two samples must be obtained in pairs. Apart from population differences, the observations in each pair must be made under identical, or nearly identical, conditions. The test is accurate if the populations are normally distributed.

Problem: In a chemical analysis laboratory, a diluted salt in solution is determined by gravimetry after precipitation and drying. To perform this operation, the laboratory has two complexing solutions, E1 and E2.

The laboratory tests each product, E1 and E2, on n = 10 diluted salt samples by measuring the amount of salt recovered after drying, in mg. The respective means obtained after drying for each sample are x̄1 = 50.3 mg and x̄2 = 53.0 mg.

The difference between each measurement pair is given by di=xi1-xi2 , and the variance of the paired differences between the two samples is given by:

s =1,11 (For the purposes of this example, it is assumed that the difference between the means corresponds to the sum of the differences over the 10 measurements)

Is there a difference between the two solutions E1 and E2 based on the means obtained?

Hypotheses and alternative hypotheses:

Scenario N°1 H0: µd=0 and H1: µd≠0 (two-tailed hypothesis)

Scenario N°2 H0: µd=0 and H1: µd>0(one-tailed hypothesis)

Risk level: α = 0.05 (one-tailed and two-tailed: 0.025)

The table of critical values for Student’s t-distribution gives, for α = 0.05: t = 1.83 (one-tailed) and, for α = 0.05: t = 2.26 (two-tailed).

Statistical test:

Two populations are considered, with means x̄1 and x̄2 and variance s².

d̄ = x̄1-x̄2= 50.3 - 53.0 = -2.7, µd=0 and t =-0.77

Conclusion:

Regardless of the scenario, the null hypothesis H0 cannot be rejected, and it can be concluded that there is no difference between the two solutions.

Critical Values Table for the Normal Distribution

Critical Values Table for Student’s t-Distribution