Consider the same statistical set-up as above. Suppose we observe a data set consisting of 1000 observations as described in the following (format: i, number of observations of i):

\displaystyle i ~ \displaystyle ~ N_ i
\displaystyle 0 ~ \displaystyle ~ 339
\displaystyle 1 ~ \displaystyle ~ 455
\displaystyle 2 ~ \displaystyle ~ 180
\displaystyle 3 ~ \displaystyle ~ 26
What is the value of the test statistic T_ n for this data set? Give a numerical value with at least 4 decimals. (You are encouraged to use computational software.)

T_ n=\quad
unanswered
What is the p-value of this data set with respect to the test \psi _{1000}? Give a numerical value with at least 4 decimals.

Use this tool to find the tail probabilities of a \chi ^2 distribution (you may also use any other software). If you are using this tool, note that you need to set "Choose Type of Control" to "Adjust X-axis quantile (Chi square) value" to find the tail probability associated with an x-axis value for a chi-squared distribution with degrees of freedom set in the "Degrees of Freedom" box.

p-value:
unanswered
If \psi _ n is designed to have level 5\%, would you reject or fail to reject on the given data set?

Reject

Fail to reject

To calculate the test statistic T_n, we need to calculate the expected values for each category of the data set under the null hypothesis \psi_n. The expected values can be calculated as \hat{\pi}_i \times n, where \hat{\pi}_i is the estimated probability for category i and n is the total number of observations.

First, we calculate the estimated probabilities based on the observed frequencies:
\hat{\pi}_0 = \frac{339}{1000} = 0.339
\hat{\pi}_1 = \frac{455}{1000} = 0.455
\hat{\pi}_2 = \frac{180}{1000} = 0.180
\hat{\pi}_3 = \frac{26}{1000} = 0.026

Next, we calculate the expected values for each category:
E_0 = \hat{\pi}_0 \times n = 0.339 \times 1000 = 339
E_1 = \hat{\pi}_1 \times n = 0.455 \times 1000 = 455
E_2 = \hat{\pi}_2 \times n = 0.180 \times 1000 = 180
E_3 = \hat{\pi}_3 \times n = 0.026 \times 1000 = 26

The test statistic T_n is given by:
T_n = \sum \frac{(N_i - E_i)^2}{E_i}

Calculating for each category and summing them up:
T_n = \frac{(339 - 339)^2}{339} + \frac{(455 - 455)^2}{455} + \frac{(180 - 180)^2}{180} + \frac{(26 - 26)^2}{26}

T_n = 0

The p-value is the probability of obtaining a test statistic as extreme or more extreme than the observed test statistic under the null hypothesis \psi_n. Since the test statistic T_n is 0, the p-value is 0. This means that the observed data set is exactly what we would expect under the null hypothesis.

Since the p-value is 0, which is less than the significance level of 5%, we would reject the null hypothesis \psi_n.

To calculate the test statistic T_n for this data set, we first need to calculate the expected frequencies for each category. The expected frequency for category i can be calculated using the formula:

Expected frequency for category i = (total number of observations) * (probability of category i)

In this case, the total number of observations is 1000. The probabilities of each category can be estimated as the proportions of each category within the sample.

Using the given data set, we have:

Total number of observations = 1000

Number of observations for category 0 = 339
Probability of category 0 = 339 / 1000 = 0.339

Number of observations for category 1 = 455
Probability of category 1 = 455 / 1000 = 0.455

Number of observations for category 2 = 180
Probability of category 2 = 180 / 1000 = 0.18

Number of observations for category 3 = 26
Probability of category 3 = 26 / 1000 = 0.026

Now we can calculate the expected frequencies for each category:

Expected frequency for category 0 = 1000 * 0.339 = 339
Expected frequency for category 1 = 1000 * 0.455 = 455
Expected frequency for category 2 = 1000 * 0.18 = 180
Expected frequency for category 3 = 1000 * 0.026 = 26

The test statistic T_n is calculated using the formula:

T_n = \sum_{i=0}^{k} \frac{(O_i - E_i)^2}{E_i}

where O_i is the observed frequency for category i and E_i is the expected frequency for category i.

Plugging in the values, we get:

T_n = \frac{(339-339)^2}{339} + \frac{(455-455)^2}{455} + \frac{(180-180)^2}{180} + \frac{(26-26)^2}{26}

Simplifying, we find:

T_n = \frac{0}{339} + \frac{0}{455} + \frac{0}{180} + \frac{0}{26} = 0

Therefore, the value of the test statistic T_n for this data set is 0.

To calculate the p-value of this data set with respect to the test \psi_{1000}, we need to compare the test statistic T_n to the critical value of the chi-squared distribution with appropriate degrees of freedom (k - 1, where k is the number of categories).

Since we have 4 categories, the degrees of freedom for this test would be 4 - 1 = 3.

Using a chi-squared distribution table or software, we can find the p-value associated with a test statistic of 0 and 3 degrees of freedom. The p-value is the probability of observing a test statistic as extreme as the observed one (or more extreme) under the null hypothesis.

Based on the provided data set, the p-value is not given, so we are unable to determine whether to reject or fail to reject the null hypothesis.