In 2010 a sample of 50 cars was taken, yielding 8 small cars, 27 medium cars and 15 large cars. A sample of 50 cars taken in 2015 revealed 10 small cars, 25 medium cars and 15 large cars. Calculate the chi-squared test statistic here.

Use the Chi-square (X^2) method.

X^2 = ∑ (O-E)^2/E, where O = observed frequency and E = expected frequency.

∑ = sum of all the cells.

E = (column total * row total)/grand total

df = n - 1, where n = number of cells

Look up value in X^2 table in the back of your textbook.

To calculate the chi-squared test statistic, you need to follow a specific formula and perform a series of calculations. Let's break it down step by step:

Step 1: Create a contingency table
First, we need to create a contingency table to organize the observed frequencies of each category. In this case, we have two sets of data from 2010 and 2015, so we'll create a table with the categories "small," "medium," and "large" in the columns and the years "2010" and "2015" in the rows. The table should look like this:

| 2010 | 2015
-------------------------------
Small | 8 | 10
Medium| 27 | 25
Large | 15 | 15

Step 2: Calculate the expected frequencies
Next, we need to calculate the expected frequencies for each cell of the contingency table. The expected frequencies represent what we would expect to see if the distribution was equal in both years.

To calculate the expected frequency for a particular cell:
1. Calculate the row total for that year by adding up the observed frequencies in that row.
2. Calculate the column total for that category by adding up the observed frequencies in that column.
3. Multiply the row total and column total, then divide by the total sample size (which is 50 in this case).

For example, to calculate the expected frequency for the "small" category in the "2010" year:
- Row Total for 2010: 8 + 27 + 15 = 50
- Column Total for Small: 8 + 10 = 18
- Expected frequency = (50 * 18) / 50 = 18

Repeat this calculation for each cell in the table to obtain the following expected frequencies:

| 2010 | 2015
-------------------------------
Small | 18 | 10
Medium| 27 | 25
Large | 15 | 15

Step 3: Calculate the chi-squared test statistic
Now we can calculate the chi-squared test statistic using the formula:

chi-squared = Σ [(Observed frequency - Expected frequency)^2] / Expected frequency

For each cell in the contingency table, calculate (Observed frequency - Expected frequency)^2, then divide by the corresponding expected frequency. Finally, sum up all these values to get the chi-squared test statistic.

Using the numbers from the contingency table, the calculations would be:

chi-squared = ((8 - 18)^2 / 18) + ((27 - 27)^2 / 27) + ((15 - 15)^2 / 15) + ((10 - 10)^2 / 10) + ((25 - 25)^2 / 25) + ((15 - 15)^2 / 15)

Simplifying this expression:

chi-squared = (100 / 18) + 0 + 0 + 0 + 0 + 0

chi-squared = 5.56

So, the chi-squared test statistic for this data is 5.56.