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

can anyone Please help, really struggling

1. To test for independence between the method of payment and age group, we can use a chi-square test. The null hypothesis (H0) is that there is no association between the two variables, and the alternative hypothesis (Ha) is that there is an association.

First, let's calculate the expected frequencies for each cell under the assumption of independence:

Age Group plastic cash or cheque Total
18-24 21 21 42
25-34 27 36 63
35-44 27 42 69
45 and over 36 90 126
Total 111 189 300

To calculate the expected frequency for each cell, we use the formula: (row total * column total) / grand total.

Next, let's calculate the chi-square statistic:

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

Using the given data, we calculate:
chi-square = [(21-42)^2/42] + [(27-21)^2/27] + [(27-42)^2/42] + [(36-27)^2/36] + [(21-63)^2/63] + [(36-36)^2/36] + [(42-69)^2/69] + [(90-36)^2/90]
= 21 + 1 + 4 + 2 + 27 + 0 + 5.57 + 29.6
≈ 90.17

Now, we need to find the degrees of freedom (df) to determine the critical value from the chi-square distribution table. The degrees of freedom for a chi-square test of independence are calculated as (number of rows - 1) * (number of columns - 1). In this case, df = (4-1) * (2-1) = 3.

From the chi-square distribution table, at α = 0.05 and df = 3, the critical value is approximately 7.82.

Finally, we can compare the calculated chi-square statistic to the critical value.
Since the calculated chi-square value (90.17) is greater than the critical value (7.82), we reject the null hypothesis. There is evidence to suggest that there is an association between method of payment and age group.

2. To test for a significant difference between the treatment means, we can use an ANOVA (Analysis of Variance) test. The null hypothesis (H0) is that there is no difference between the treatment means, and the alternative hypothesis (Ha) is that at least one treatment mean is different.

First, calculate the total sum of squares (SST) using the formula:

SST = ΣΣ(Xij - X)^2

where Xij is each individual data point, X is the overall mean, and ΣΣ represents summation over all treatment groups.

Next, calculate the sum of squares between (SSB) using the formula:

SSB = Σ(nj(Xj - X)^2)

where nj is the number of observations in each treatment group, Xj is the mean of each treatment group, and Σ represents summation over all treatment groups.

Then, calculate the sum of squares within (SSW) using the formula:

SSW = ΣΣ(Xij - Xj)^2

where Xij is each individual data point, and Xj is the mean of each treatment group.

Finally, calculate the mean squares (MSB and MSW) by dividing the sum of squares between and within by their respective degrees of freedom.

MSB = SSB / (number of treatment groups - 1)
MSW = SSW / (total number of observations - number of treatment groups)

Calculate the F statistic using the formula:

F = MSB / MSW

Now, let's calculate the ANOVA table using the information provided:

Treatment | Sum of Squares (SS) | Degrees of Freedom (df) | Mean Squares (MS) | F
===============================================================================================
Between 41.73 2 20.86 5.95
Within 81.34 26 3.13
Total 123.07

The degrees of freedom for the between group (dfB) is number of treatment groups - 1, which is 3 - 1 = 2. The degrees of freedom for the within group (dfW) is the total number of observations - number of treatment groups, which is 29 - 3 = 26.

To calculate the critical value, we need to find the critical F value at α = 0.05 and with dfB = 2 and dfW = 26. From the F distribution table, the critical value is approximately 3.38.

Since the calculated F value (5.95) is greater than the critical value (3.38), we reject the null hypothesis. There is evidence to suggest that there is a significant difference between the treatment means.

I hope this explanation helps you understand how to approach these statistical tests!