How to use chi-square to test variance?

211 Views Asked by At

There is a question like this :

A factory produces certain chemical acid. It claims that the concentration is 90% and the variance is 12. To check those facts few samples were taken and the concentration was measured – see the table. Test at the significance level of 0.05 test whether the concentration is 90% as the factory claims. (Assume the normal distribution.)

we have six samples which show concentration which are these {88, 94 ,94 ,95 ,91 ,96}

How can I use chi-square test to test if the claimed variance (12) is reliable?

1

There are 1 best solutions below

0
On

Assuming normal data: t test for population mean. If you want a test for the population mean, use a one-sample t test. If you are doing a two sided test of $H_0: \mu = 90 = 90$ against $H_a: \mu \ne 90,$ at the 5% level, then you cannot reject because the P-value exceeds 0.05. Results from R statistical software, which you can verify using formulas in your text.

x = c(88, 94, 94, 95, 91, 96)
t.test(x, mu=90)

        One Sample t-test

data:  x
t = 2.4772, df = 5, p-value = 0.05604
alternative hypothesis: true mean is not equal to 90
95 percent confidence interval:
 89.88687 96.11313
sample estimates:
mean of x 
       93 

While the average of your six observations exceeds 90, the average does not exceed 90 by enough to be considered significantly different from 90.

The $T$-statistic is $T = 2.4772.$ If $|T| > 2.571$ then you would have been able to reject $H_0.$ The value $c = 2.571$ is called the 'critical value' of the two-sided test.

qt(.975, 5)
[1] 2.570582

Assuming normal data, chi-squared test for population variance. If you want a test for the population variance to test $H_0: \sigma^2 = 12$ vs. $H_a: \sigma \ne 12,$ then (for normal data) do a test using the chi-squared distribution: $ \frac{(n-1)S^2}{\sigma^2} \sim \mathsf{Chisq}(df= n-1).$ Here are results from Minitab statistical software: There is not evidence to reject the null hypothesis at the 5% level.

Test and CI for One Variance: x

Method

Null hypothesis         σ-squared = 12
Alternative hypothesis  σ-squared ≠ 12

The chi-square method is only for the normal distribution.
The Bonett method is for any continuous distribution.


Statistics

Variable  N  StDev  Variance
C1        6   2.97      8.80


95% Confidence Intervals

                          CI for         CI for
Variable  Method          StDev         Variance
x         Chi-Square  (1.85,  7.28)  (3.43,  52.93)   # 12 lies in CI
          Bonett      (1.01, 12.90)  (1.03, 166.43)

Tests

                           Test
Variable  Method      Statistic  DF  P-Value
x         Chi-Square       3.67   5    0.803      # > .05: Do not reject
          Bonett              —   —    0.776

R code to get a 95% confidence interval for $\sigma^2$ (normal data) is as follows. This is the same result as in Minitab, but not rounded to two places:

 5*var(x)/qchisq(c(.975,.025), 5)
 [1]  3.428794 52.934775

The derivation for the CI is as follows:

$$0.95 = P\left(L \le \frac{(n-1)S^2}{\sigma^2} \le U\right) = P\left(\frac{(n-1)S^2}{U} \le \sigma^2 \le \frac{(n-1)S^2}{L}\right),$$ where $L$ and $U$ cut probability 0.025 from the lower and upper tails, respectively, of the distribution $\mathsf{Chisq}(n-1 = 5).$

R code for P-value of two-sided test (result agrees with 0.803 in Minitab):

var(x)
[1] 8.8
Q = 5*var(x)/12;  Q
[1] 3.666667
2*pchisq(Q, 5)
[1] 0.8033356