1.

The following sample data shows the use of plastic (debit and credit) cards versus
cash/cheque by four age groups:
Age Group 18-24, 25-34, 35-44, 45 and over
Payment Method
plastic 21, 27, 27, 36
cash or cheque 21, 36, 42, 90

Test for independence between method of payment and age group. Use the p-value approach
and α = 0.05. To make it easier to compare answers, please round off to two decimal places.

2. Consider the following effects of three treatments
A B C
23 33 25
34 25 23
26 35 32
33 29 35
24 32 22
24 26 34
22 26 29
31 33 36
32 33
31 35
mean 27.1 30.2 30.4
Sample Standard deviation 4.8 3.5 5.3
At α = 0.05 is there a significant difference between the treament means? To make our
numbers easier to compare, you can round off the overall mean to one decimal place. Don’t
forget to provide an ANOVA table

To test for independence between method of payment and age group in the first question, we can use a chi-square test for independence.

Step 1: Set up hypotheses:
- Null hypothesis (H0): There is no association between method of payment and age group.
- Alternative hypothesis (Ha): There is an association between method of payment and age group.

Step 2: Set the significance level:
In this case, α = 0.05.

Step 3: Compute the expected frequencies:
To compute the expected frequencies, we can use the formula: (row total * column total) / grand total.

Expected frequencies table:
plastic cash/cheque Total
18-24 (66 * 105) / 237 = 29.15 (84 * 105) / 237 = 37.85 66
25-34 (66 * 105) / 237 = 29.15 (84 * 105) / 237 = 37.85 66
35-44 (72 * 105) / 237 = 31.89 (90 * 105) / 237 = 40.11 72
45 and over (126 * 105) / 237 = 55.80 (168 * 105) / 237 = 74.20 126
Total 237 105 342

Step 4: Compute the chi-square test statistic:
The chi-square test statistic is computed using the formula:
X^2 = Σ [(observed frequency - expected frequency)^2 / expected frequency]

Substituting the values into the formula, we get:
X^2 = [(21-29.15)^2 / 29.15] + [(27-29.15)^2 / 29.15] + [(27-31.89)^2 / 31.89] + [(36-55.80)^2 / 55.80] + [(21-37.85)^2 / 37.85] + [(36-37.85)^2 / 37.85] + [(42-40.11)^2 / 40.11] + [(90-74.20)^2 / 74.20] = 20.34

Step 5: Determine the degrees of freedom:
The degrees of freedom for a chi-square test of independence are calculated as:
df = (number of rows - 1) * (number of columns - 1) = (4-1) * (2-1) = 3

Step 6: Find the p-value:
To find the p-value, we can consult a chi-square distribution table using the chi-square test statistic and degrees of freedom.

Based on the given data, the p-value corresponding to a chi-square test statistic of 20.34 with 3 degrees of freedom is less than 0.001.

Step 7: Make a decision:
Since the p-value (less than 0.001) is less than our significance level (α = 0.05), we reject the null hypothesis (H0). This means that there is sufficient evidence to conclude that there is an association between method of payment and age group.

For the second question, we can use an ANOVA (Analysis of Variance) test to determine if there is a significant difference between the treatment means.

Step 1: Set up hypotheses:
- Null hypothesis (H0): There is no significant difference between the treatment means.
- Alternative hypothesis (Ha): There is a significant difference between the treatment means.

Step 2: Set the significance level:
In this case, α = 0.05.

Step 3: Compute the sum of squares:
To compute the sum of squares, we use the formula:
SS(Total) = Σ[(X - X_mean)^2]

SS(Total) = [(23-27.1)^2 + (34-27.1)^2 + ... + (31-27.1)^2 + (35-30.2)^2 + (33-30.2)^2 + (35-30.2)^2 + (32-30.2)^2 + ... + (35-30.4)^2]

SS(A) = n_A * (A_mean - X_mean)^2
SS(B) = n_B * (B_mean - X_mean)^2
SS(C) = n_C * (C_mean - X_mean)^2
SS(Error) = SS(Total) - SS(A) - SS(B) - SS(C)

Step 4: Compute the mean squares:
Mean Squares (MS) = SS / degrees of freedom

Mean Squares (A) = SS(A) / (k-1)
Mean Squares (Error) = SS(Error) / (n-k)

Step 5: Compute the F-test statistic:
The F-test statistic is computed using the formula:
F = MS(A) / MS(Error)

Step 6: Find the critical value or p-value:
To find the critical value or p-value, we can consult an F-distribution table using the F-test statistic and the degrees of freedom for treatments (k-1) and error (n-k).

Step 7: Make a decision:
If the F-test statistic is greater than the critical value or if the p-value is less than the significance level, we reject the null hypothesis (H0). This means that there is sufficient evidence to conclude that there is a significant difference between the treatment means.

By following these steps, you should be able to calculate the test statistic, degrees of freedom, and make the decision for both questions.