Sei sulla pagina 1di 5

Discipline: Dietetics

Test used: χ2 test

Introduction
Students are often considered to be large consumers of snacks due to the presence of
vending machines at schools. This raises an interesting question: do women crave more
for sweet or salty products compared to men? The present paper tries to answer this
question.

Material and Methods


The experiment was done at the Macdonald campus. The product bought by 50 men and
50 women at the vending machines was noted (Table 1). Chocolate bars, cookies and
beverages were considered as sweet products whereas salty products included chips and
pretzel.

Table 1. Product consumed according to the gender.


Gender sweet salty Total
Women 41 9 50
Men 33 17 50
Total 74 26 100

Test Used
The gender and the type product consumed (chocolate and chips) are both qualitative
variables. In this case, the most appropriate test is the Chi-Square test for Independence.
This version of the test is not covered in the lectures. Briefly, this test is specially
designed to quantify the association between two qualitative variables. Here are the two
hypotheses:
H0: There is no association between the gender and the type of product consumed.
H1: There is an association between the gender and the type of product consumed.

To test H0, we compare observed counts with expected counts (expected if H0 is true) and
if observed counts are far enough from expected counts, we reject H0.
The χ2 statistic is based on a sum of differences between observed and expected counts,
one for each cell of table 1. For example, 41 women bought a chocolate product. The
expected count for this cell is
Total of people consuming a chocolate product × total of women 74 × 50
= = 37
Total number of people 100
Results
Table 2, shows the expected values for all the cells.

Table 2. Expected number of product consumed according to the gender.


Gender Sweet Salty
Women 37 13
Men 37 13

We can now find the value of the χ2 statistic, adding the 4 differences between observed
and expected counts.

2 (41 − 37) 2 (9 − 13) 2 (33 − 37) 2 (17 − 13) 2


χ obs = + + +
37 13 37 13
We obtain χ2obs = 0.43 + 1.23 + 0.43 + 1.23 = 3.32

The observed value of χ2 measures how far the observed counts are from the counts that
would be expected if H0 were true. To know if χ2obs = 3.32 is large enough to reject H0,
this value is to compared against the sampling distribution of χ2 if H0 was true.

There are 2 genders and 2 outcomes (sweet or salty). That is r =2, and c = 2. The χ2
statistic therefore has degree of freedom
(r-1)(c-1) = (2-1) (2-1) = (1) (1) = 1
By looking at the χ table, we see that χ2 = 3.32 is smaller than the critical value of 3.84 at
2

α = 0.05. Because we do not reject H0, this study shows that men and women do not
consume different types of snacks.
Same analysis with SAS
SAS codes

data snacks;
input gender$ product$ number;
cards;
Women Sweet 41
Women Salty 9
Men Sweet 33
Men Salty 17
;
proc freq data = snacks;
weight number;
table gender*product/chisq measure;
run;
The FREQ Procedure
Table of gender by product
gender product
Frequency|
Percent |
Row Pct |
Col Pct |Salty |Sweet | Total
_________|________|________|_______
Men | 17 | 33 | 50
| 17.00 | 33.00 | 50.00
| 34.00 | 66.00 |
| 65.38 | 44.59 |
_________|________|________|
Women | 9 | 41 | 50
| 9.00 | 41.00 | 50.00
| 18.00 | 82.00 |
| 34.62 | 55.41 |
_________|________|________|
Total 26 74 100
26.00 74.00 100.00

Statistics for Table of gender by product


Statistic DF Value Prob
______________________________________________________
Chi-Square 1 3.3264 0.0682
Likelihood Ratio Chi-Square 1 3.3685 0.0665
Continuity Adj. Chi-Square 1 2.5468 0.1105
Mantel-Haenszel Chi-Square 1 3.2931 0.0696
Phi Coefficient 0.1824
Contingency Coefficient 0.1794
Cramer's V 0.1824

Fisher's Exact Test


__________________________________
Cell (1,1) Frequency (F) 17
Left-sided Pr <= F 0.9805
Right-sided Pr >= F 0.0548
Table Probability (P) 0.0353
Two-sided Pr <= P 0.1095
Statistics for Table of gender by product
Statistic Value ASE
______________________________________________________
Gamma 0.4024 0.1986
Kendall's Tau-b 0.1824 0.0968
Stuart's Tau-c 0.1600 0.0863
Somers' D C|R 0.1600 0.0863
Somers' D R|C 0.2079 0.1097
Pearson Correlation 0.1824 0.0968
Spearman Correlation 0.1824 0.0968
Lambda Asymmetric C|R 0.0000 0.0000
Lambda Asymmetric R|C 0.1600 0.1577
Lambda Symmetric 0.1053 0.1072
Uncertainty Coefficient C|R 0.0294 0.0314
Uncertainty Coefficient R|C 0.0243 0.0261
Uncertainty Coefficient Symmetric 0.0266 0.0285

Estimates of the Relative Risk (Row1/Row2)


Type of Study Value 95% Confidence Limits
_________________________________________________________________
Case-Control (Odds Ratio) 2.3468 0.9269 5.9416
Cohort (Col1 Risk) 1.8889 0.9319 3.8286
Cohort (Col2 Risk) 0.8049 0.6347 1.0207

Sample Size = 100


Interpretation of the SAS output
We see that the observed value of χ2 provided by SAS is the same as that calculated in
the first section. To assess the significance of the observed value of χ2, SAS follows the
probability approach instead of the critical region approach used above, though the
results are equivalent, the final decision being the same. SAS computes the probability of
obtaining a test statistic value larger than the observed value under the null hypothesis.
In the present case, this value is 0.0682, which is more than the chosen significance level
of α=0.05, and the null hypothesis is thus accepted.

Conclusion
By statistical analysis, it was found that there is no significant difference in men’s or
women’s preference for snack food type.

Potrebbero piacerti anche