Chi-Squared Distribution
Study guide: Exam MAS-I
A Chi-Squared Distribution with r degrees of freedom, written \chi^2(r), is the distribution of the sum of the squares of r independent standard normal random variables. A chi-squared random variable with r degrees of freedom is
V = Z_1^2 + Z_2^2 + \cdots + Z_r^2
Z_1, \ldots, Z_rare independent standard normal random variables.
Its mean is
E[V] = r
and its variance is
\text{Var}(V) = 2r
The chi-squared distribution with r degrees of freedom is the gamma distribution with shape r/2 and scale 2. A sum of independent chi-squared random variables is chi-squared, with degrees of freedom equal to the sum of their degrees of freedom.
X_1, \ldots, X_5are a random sample from a normal distribution with mean\muand variance\sigma^2. What are the distribution, mean and variance of\sum_^(X_i - \mu)^2/\sigma^2?
- Each
(X_i - \mu)/\sigmais standard normal, and the five are independent.- The sum of their squares is chi-squared with 5 degrees of freedom.
- Its mean is 5 and its variance is
2 \times 5 = 10.
Sums of squares of a normal sample
For a random sample X_1, \ldots, X_n from a normal distribution, replacing \mu by the sample mean \bar{X} costs one degree of freedom, so the sample variance S^2 satisfies
\frac{(n-1)S^2}{\sigma^2} \sim \chi^2(n-1)
The sample mean is normal with variance \sigma^2/n, so n(\bar{X} - \mu)^2/\sigma^2 is the square of one standard normal random variable and is \chi^2(1).
The logarithms of 10 claim amounts are a random sample from a normal distribution, with sample variance
s^2 = 0.36. What is a 95% confidence interval for\sigma^2?
9S^2/\sigma^2is\chi^2(9), and9s^2 = 3.24.- In the 9 degrees of freedom row,
P(V \le 2.70) = 0.025andP(V \le 19.02) = 0.975.- Solving
2.70 \le 3.24/\sigma^2 \le 19.02for\sigma^2gives3.24/19.02 \le \sigma^2 \le 3.24/2.70.- The 95% confidence interval for
\sigma^2is(0.170, 1.200).
Testing a normal variance
To test H_0: \sigma^2 = \sigma_0^2 with a random sample of size n from a normal distribution, the test statistic is
\frac{(n-1)S^2}{\sigma_0^2}
\sigma_0^2is the variance underH_0.
Under H_0 the statistic is \chi^2(n-1). Against H_1: \sigma^2 > \sigma_0^2, H_0 is rejected when the statistic exceeds the value that \chi^2(n-1) exceeds with probability \alpha. Against H_1: \sigma^2 < \sigma_0^2, H_0 is rejected when the statistic is below the value that \chi^2(n-1) falls below with probability \alpha.
The CAS MAS-I chi-squared table gives lower-tail areas. The entry in column p is the value c with P(V \le c) = p, so an upper-tail critical value at level \alpha is read from the column 1 - \alpha.
A random sample of 20 losses from a normal distribution has
s^2 = 45. What is the smallest significance level at whichH_0: \sigma^2 = 100is rejected in favour ofH_1: \sigma^2 < 100?
- The test statistic is
19 \times 45/100 = 8.55.- In the 19 degrees of freedom row, the lower-tail values are 7.63 at 0.010, 8.91 at 0.025 and 10.12 at 0.050.
- The statistic is below 8.91 but not below 7.63.
H_0is rejected at the 2.5% level but not at the 1% level.
Likelihood ratio tests
For nested models, the likelihood ratio statistic is twice the difference between the maximized log-likelihoods of the larger and the smaller model. In large samples, under the hypothesis that the smaller model is adequate,
2\bigl(l(\hat{\theta}_{\text{larger}}) - l(\hat{\theta}_{\text{smaller}})\bigr) \sim \chi^2(q)
qis the number of parameters the larger model adds.
For a GLM, the statistic is the drop in deviance, divided by the dispersion parameter \phi when \phi is not 1. When the p-value is below the significance level, the smaller model is rejected and the added variables are statistically significant.
A claim frequency GLM has maximized log-likelihood
-1250.6. Adding a rating variable with 4 levels raises it to-1245.9. Is the variable significant at the 5% level, and between which values does the p-value lie?
- The 4 levels add
q = 3parameters.- The statistic is
2\bigl(-1{,}245.9 - (-1{,}250.6)\bigr) = 9.4.- In the 3 degrees of freedom row, the values are 7.81 at 0.950, 9.35 at 0.975 and 11.34 at 0.990.
- The statistic exceeds 7.81, so the variable is significant at the 5% level.
- The statistic is between 9.35 and 11.34, so the p-value is between 0.01 and 0.025.
Reading the lower-tail table for an upper-tail test The CAS table's column 0.050 holds the value
\chi^2(r)falls below with probability 0.05. An upper-tail test at the 5% level uses the column 0.950. With 3 degrees of freedom the critical value is 7.81, not 0.35.