Why choose us?

We understand the dilemma that you are currently in of whether or not to place your trust on us. Allow us to show you how we can offer you the best and cheap essay writing service and essay review service.

One sample Chi-square Test

: SPSS Exercises

One sample Chi-square Test

This test is conducted on variables which consist of two or more categories and it investigates if the proportions of scores/observations which appear in categories of a variable are equal to expected values. The table below shows Kristen’s variables which were used in conducting a research study on the method of cooking and the taste of chips.

Table 1: Variables in Kristen’s Study of Cooking Methods and Taste of Chips

TasteTaste has 3 categories 1 = potato chips fried in Animal Fat 2 = potato chips fried in Canola oil 3 = Baked potato chips
 Hypothesized TasteTaste has 2 categories 0 =  potato chips fried in Canola oil 1 = potato chips  fried in Animal Oil or Baked

Question 1

Creating a weighted data file

To add weight to the data file, SPSS was used and the following procedure was followed. After loading the file into SPSS, click on Data from the menu bar. A drop down menu appears from where you choose `weight cases’. Then a dialogue box appears where you click on the radio button for `weight cases by’ then from the variable box on the left hand side, select “number who preferred each type of chip” and move it to the right hand side box for frequency variables and eventually click ok (Kumar, 2009).

Question 2

Conducting a one-sample chi-square test to study if the cooking method used to fry potato chips affects the resulting taste. From the output, identify the observed frequency for potato chips fried in canola oil, the p value and the chi-square value.

The procedure for conducting a one sample chi-square test in SPSS is described below. Load the data into SPSS then from the menu bar click analyze and choose non parametric tests then choose chi-square from the legacy dialogue box which appears. A chi-square dialogue box appears where you select the following variables from the left window; “method of cooking potato chips” and “number who preferred each type of chi” and move them to the right side window and eventually click ok. The tables below present the output obtained after conducting the test.

                                           Table 2: Method of cooking potato chips
 Observed NExpected NResidual
Fried in animal fat716.0-9.0
Fried in Canola oil3316.017.0
                                    Table 3: Number who preferred each type of chip
 Observed NExpected NResidual
                                                  Table 4: Test Statistics
 Method of cooking potato chipsNumber who preferred each type of chip
Asymp. Sig..000.000
a. 0 cells (.0%) have expected frequencies less than 5.The minimum expected cell frequency is16.0.     After conducting the test, the observed frequency for potato chips that have been fried in Canola oil is 33 as shown in table 2 in the second column. Table 4 above presents the test statistics obtained after conducting the test whereby the chi-square value was 27.125 at 2degrees of freedom and test was significant at a p value of 0.000.

Question 3

The expected frequencies obtained for the 3 categories of potato chips are shown in table 3 above in the third column where 16 individuals were expected in each case. The study has a sample size of 48 individuals which is relatively large and it is expected that all the individuals are allocated randomly (Gay et al, 2009)

Kristen states that individuals seem to likely prefer potato chips that are fried in canola oil over those that are fried in animal fat or baked. The following hypothesis was formulated to conduct the test;

H0: Individuals likely seem to prefer potato chips that have been fried in Canola oil over those fried in animal fat or baked.


H1: Individuals do not likely seem to prefer potato chips that have been fried in canola oil over those fried in animal fat or baked.

A follow up test was conducted using expected frequencies which are not equal following the procedure explained above and the obtained output is shown in the table below.

                                                Table 5: Test Statistics
 Number who preferred each type of chipMethod of cooking potato chips
Asymp. Sig..009.009
a. 0 cells (.0%) have expected frequencies less than 5. The minimum expected cell frequency is 24.0.

Question 4

A results section of the conducted analyses

A one-sample chi-square test was conducted to investigate whether individuals prefer potato chips in canola oil over those fried in animal fat or baked. The results of the test were significant,  = (2, N = 48) = 27.125, . The proportion of individuals who prefer potato chips fried in canola oil was greater than the hypothesized proportion while the proportions of potato chips fried in animal fat and baked were less than their hypothesized proportions. A follow up test  indicated that the proportion of individuals who preferred potato chips fried in canola oil did not differ significantly from the proportion of individuals who preferred potato chips fried in animal fat or baked,= (1, N = 15) = 6.750, . The results suggest that individuals did not prefer potato chips fried in canola oil over those fried in animal or baked.

Two Independent –Samples Test: The Mann-Whitney U Test

This test is used to investigate if median scores of a variable being tested appear to be different between 2 groups. The table below shows the variables studied in Billie’s test.

Table 6: Test variables

WeightWeight is the grouping variable; 1 = Over weight 2 = Normal weight
 Time in secondsIt is the test variable and it shows the time taken by an individual to complete a meal

To carry out Billie’s study, the following test was conducted via SPSS. After loading the data file into SPSS, click analyze from the menu bar, click nonparametric tests, and click legacy dialogue box and then click 2 independent samples. A 2 independent samples tests dialog box appears where you pick time in seconds from the left window and post it to the test variable list then select weight (1,2) and post it to the box for the grouping variable. Click define groups where you type 1 in the group 1 box to show the over -weight cases and 2 is inserted into group 2 box to show normal weight and click continue. Move to the test type section and check the Mann-Whitney u box then click ok to conduct the test (Kumar, 2009). The tables below indicate the results obtained from the test.

Table 7: Ranks
 weightNMean RankSum of Ranks
Time in Secondsoverweight108.3083.00
normal weight3024.57737.00
Table 8: Test Statistics
 Time in Seconds
Mann-Whitney U28.000
Wilcoxon W83.000
Asymp. Sig. (2-tailed).000
Exact Sig. [2*(1-tailed Sig.)].000a
a. Not corrected for ties.
b. Grouping Variable: weight

Question 1

The Mann-Whitney U test conducted shows that the mean rank obtained for normal weight individuals is 24.57 as indicated by results from table 7 above. The p value for the test is .000 and the Z value for corrected ties is -3.811.

Question 2

Comparison between the p value for the Mann-Whitney U test and the p value obtained from conducting an independent samples t test. After conducting an independent samples t test, the p value obtained was 0.000 which was similar to the p value obtained from conducting the Mann-Whitney U test hence no difference was noted (Gay, et al, 2009). The results table for the independent samples t test is shown in the appendix section as table 12.

Question 3

A Mann-Whitney U test was conducted to evaluate the hypothesis that overweight individuals tend to eat faster than normal weight individuals. The results of the conducted test were as expected and significant, Z = -3.811,  Overweight individuals had an average rank of 8.30 while normal weight individuals had an average rank of 24.57 as shown in tables 7 & 8 above.

Question 4

The box plot named figure I from the appendix section shows the distribution of the time taken by both the overweight and normal weight individuals. The graph was generated through SPSS by following the procedures from the menu bar and graphs to box plots then defining axis variables (Kumar, 2009).

Conducting the K Independent-Samples Tests: The Kruskal-Wallis Tests

Marvin conducted a research study to test the effect of hair color on social extroversion. The table below indicates the variables used in the study.

Table 9: Research variables

VariableDefinition of Terms
Hair Color  1 = Blond 2 = Brunet 3 = Red Head
Social ExtroversionA measure of social extroversion

Question 1

A Kruskal-Wallis test was conducted to investigate the presence of a relationship between the 2 variables under study. The procedure similar to Mann-Whitney U test was followed and the results of conducting the test are shown below (Kumar, 2009).

Table 10

 Hair ColorNMean Rank
Social ExtroversionBlond612.75

Table 11

Test Statisticsa,b
 Social Extroversion
Asymp. Sig..051
a. Kruskal Wallis Test
b. Grouping Variable: Hair Color

  The Kruskal-Wallis test indicates the presence of a significant difference in the medians= (2, N =18) = 5.963, . Since the test is significant, follow up tests should be conducted (Gay, et al, 2009).

Question 2

The effect size for the test is obtained by computing the formula below (Gay, et al, 2009);

 η2 =  whereby 5.963 is divided by 17

η2 = 0.35.

Question 3

A box plot was generated via SPSS to show the distribution of social extroversion among the three groups as shown in figure 2 from the appendix section.

Question 4

One way ANOVA was conducted for comparison of the results with those obtained from the Kruskal-Wallis test. The table below shows the output after conducting the test,

  Tests of Between-Subjects Effects
Dependent Variable: Social Extroversion    
SourceType III Sum of SquaresdfMean SquareFSig.Partial Eta Squared
Corrected Model24.111a212.0563.511.056.319
Corrected Total75.61117    
a. R Squared = .319 (Adjusted R Squared = .228)   

The ANOVA test conducted was significant at the 0.05 level of precision, F (2, 15) = 3.511, p = 0.056, ms error = 3.433 (Ghauri, et al. 2005).

Both the Kruskal-Wallis and the one way ANOVA tests conducted indicated that the test were significant at p values .051 and 0.56 respectively (Ghauri, et al. 2005).

Question 5

A Kruskal-Wallis test was conducted to investigate the differences between hair colors on the median change in social extroversion. The test was significant, = (2, N =18) = 5.963, . The effect size for the relationship between hair color and extroversion was strong with hair color accounting for 35% of the variance in social extroversion.


Ghauri, P., Granhaug, K. and Kristianslund, I.,(2005).  Research Methods in Business Studies: a  Practical Guide.

Kumar, R. (2009). Research Methodology: A step-by-step Guide for Beginners. Greater Kalash:  Sage Publications

Gay, L,R., Mills, E. G., Airasian, P.,(2009). Educational Research: Competencies for Analysis     and Applications (10th ed.)

Figure 1: Source (SPSS output)

Independent Samples Test
  Levene’s Test for Equality of Variancest-test for Equality of Means
  FSig.tdfSig. (2-tailed)Mean DifferenceStd. Error Difference95% Confidence Interval of the Difference
Time in SecondsEqual variances assumed2.745.106-3.97538.000-109.40027.522-165.116-53.684
Equal variances not assumed  -5.39730.828.000-109.40020.272-150.754-68.046

Table 12

All Rights Reserved, scholarpapers.com
Disclaimer: You will use the product (paper) for legal purposes only and you are not authorized to plagiarize. In addition, neither our website nor any of its affiliates and/or partners shall be liable for any unethical, inappropriate, illegal, or otherwise wrongful use of the Products and/or other written material received from the Website. This includes plagiarism, lawsuits, poor grading, expulsion, academic probation, loss of scholarships / awards / grants/ prizes / titles / positions, failure, suspension, or any other disciplinary or legal actions. Purchasers of Products from the Website are solely responsible for any and all disciplinary actions arising from the improper, unethical, and/or illegal use of such Products.