ANOVA, Chi-Square Tests, and Regression
PSYC FPX 4700 Assessment 4 Anova Chi, Square Tests, and Regression Complete the following problems within this Word document. Do not submit other files. Show your work for problem sets that require calculations. Ensure that your answer to each problem is clearly visible. You may want to highlight your answer or use a different type color to set it apart.
ANOVA
Problem Set 4.1: Critical Value
Criterion: Explain the relationship between k and power based on calculated k values.
Instructions: Read the following and answer the questions.
Work through the following and write down what you see in the F-table. This will help familiarize you with the table.
The F-table: The degrees of freedom for the numerator (k − 1) are across the columns; the degrees of freedom for the denominator (N − k) are across the rows in the table. A separate table is included for a .05 and .01 level of significance.
Increasing the levels of the independent variable (k):
Suppose we have a sample size of 24 participants (N = 24). Record the critical values given the following values for k:
| .05 | .01 | |
| k = 2k = 4k = 6k = 8 | 4.303.102.772.59 | 7.795.954.954.54 |
As k increases (from 1 to 8), does the critical value increase or decrease? Based on your answer, explain how k is related to power.
In increasing k from 2 to 8, the critical value goes down because the degrees of freedom of the numerator, that is number of groups minus one, increases. Lower critical value indicates that smaller differences between group means can be detected as statistically significant differences, leading to greater power. This means that increasing the number of groups will improve the ability of the test to detect true differences.
Problem Set 4.2: One-way ANOVA in JASP
Criterion: Calculate an ANOVA in JASP.
Data: Use the dataset stress.jasp.The dataset stress.jasp is a record of the amount of fat (in grams) consumed in a buffet-style lunch among professional bodybuilders under conditions of high, moderate, and low stress.
Instructions: Complete the steps below.
- Download stress.jasp. Double-click the icon to open the dataset in JASP.
- In the Toolbar, click ANOVA. In the menu that appears, under Classical, select ANOVA.
- Select Fat grams consumed and then click the upper Arrow to send it over to the Dependent Variable box.
- Select Stress level and then click the lower Arrow to send it over to the Fixed factors box.
- Check the Descriptive statistics box.
- Copy and paste the output below.
| Source | Sum of Squares | df | Mean Square | F | P |
| Stress Level | 15.600 | 2 | 7.800 | 1.773 | 0.212 |
| Residuals | 52.800 | 12 | 4.400 |
Problem Set 4.3: One-way ANOVA in Excel
Criterion: Calculate an ANOVA in Excel.
Instructions: Use the data from the table below to complete the following steps:
- Open Excel to an empty sheet.
- Enter the data from this table.
| Stress Levels | ||
| High | Moderate | Low |
| 10 | 9 | 9 |
| 7 | 4 | 4 |
| 8 | 7 | 6 |
| 12 | 6 | 5 |
| 6 | 8 | 7 |
- In Row 1, enter High in cell A1, Moderate in cell B1, and Low in cell B1.
- In the toolbar, click Data Analysis, select Anova: Single Factor, and click OK.
- In Input Range: $A$1:$C$6, put a check next to Labels in First Row, click OK.
- Results will appear in a new sheet to the left; copy and paste the input below.
ANOVA: Single Factor
| Source of Variation | SS | df | MS | F | P-value |
| Between Groups | 15.600 | 2 | 7.800 | 1.773 | 0.212 |
| Within Groups | 52.800 | 12 | 4.400 | ||
| Total | 68.400 | 14 |
Problem Set 4.4: One-way ANOVA Results in APA Style
Criterion: Report ANOVA results in APA format.
Data: Use the results from Problem Set 4.4.
Instructions: Complete the following:
- State the null hypothesis.There is no significant difference in fat grams consumed among the different stress level groups (high, moderate, and low).
- Report your results in APA format (as you might see them reported in a journal article).
These analyses were conducted to determine the influence of stress level on the consumption of fat grams. Results indicate no differences in fat consumption levels between high stress, moderate stress, and low stress groups. This test did find an F-ratio of 1.773 and a corresponding p-value of 0.212, where variance among groups (2 df) was compared to variance within groups (12 df). Since the p-value is greater than 0.05, the null hypothesis could not be rejected, suggesting that stress levels do not affect fat consumption levels significantly.
Problem Set 4.5: Interpret ANOVA Results
Criterion: Interpret the results of an ANOVA.
Instructions: Read the following and answer the question.
Data: Life satisfaction among sport coaches. Drakou et al. (2006) tested differences in life satisfaction among sport coaches. They tested differences by sex, age, marital status, and education. The results of each test in the following table are similar to the way in which the data were given in their article.
| Independent Variables | Life Satisfaction | ||||
|---|---|---|---|---|---|
| M | SD | F | p | ||
| Sex | 0.68 | .409 | |||
| Men | 3.99 | 0.51 | |||
| Women | 3.94 | 0.49 | |||
| Age | 3.04 | .029 | |||
| 20s | 3.85 | 0.42 | |||
| 30s | 4.03 | 0.52 | |||
| 40s | 3.97 | 0.57 | |||
| 50s | 4.02 | 0.50 | |||
| Marital status | 12.46 | .000 | |||
| Single | 3.85 | 0.48 | |||
| Married | 4.10 | 0.50 | |||
| Divorced | 4.00 | 0.35 | |||
| Education | 0.82 | .536 | |||
| High school | 3.92 | 0.48 | |||
| Postsecondary | 3.85 | 0.54 | |||
| University degree | 4.00 | 0.51 | |||
| Masters | 4.00 | 0.59 | |||
- Which factors were significant at a .05 level of significance?
The ones falling under significant factors at a .05 level of significance were age and marital status. Since p values for age was at 0.029, which is below the .05 cutoff, it indicates there are differences in life satisfaction across the age groups. In the same way, the p value for marital status was 0.000, which is below .05, suggesting significant differences in life satisfaction across marital statuses. In contrast, sex (p = 0.409) and education (p = 0.536) were nonsignificant values, meaning life satisfaction itself was not significantly different based on these variables.
State the number of levels for each factor.
There are as follows the number of levels for each factor: Sex with 2 levels (Men, Women); Age with 4 levels (20s, 30s, 40s, 50s); Marital status with 3 levels (Single, Married, Divorced); Education with 4 levels (High School, Postsecondary, University Degree, Master’s).
Problem Set 4.6: Tukey HSD Test in JASP
Criterion: Calculate post hoc analyses in JASP.
Data: Use stress.jasp data from Problem Set 4.2.
Instructions: Complete the steps below. (Note: The first 7 steps below are repeated from Problem Set 4.2).
- Download stress.jasp. Double-click the icon to open the dataset in JASP.
- In the Toolbar, click ANOVA. In the menu that appears, under Classical, select ANOVA.
- Select Fat grams consumed and then click the upper Arrow to send it over to the Dependent Variable box.
- Select Stress level and then click the lower Arrow to send it over to the Fixed factors box.
- Check the Descriptive statistics box.
- Select Post-Hoc Tests. In the menu that appears, select Stress level and then click the Arrow to move it from the left to the right box.
- Check Standard and Tukey and uncheck any other boxes in the Post-Hoc area.
- Copy and paste the output below.
Note: You will use these results for Problem Set 4.7.
ANOVA table
| Source | Sum of Squares | df | Mean Square | F | p |
| Stress Level | 15.600 | 2 | 7.800 | 1.773 | 0.212 |
| Residuals | 52.800 | 12 | 4.400 |
Problem Set 4.7: Tukey HSD Interpretation
Criterion: Interpret Tukey HSD results from JASP output.
Data: Use your output from Problem Set 4.6.
Instructions: Identify where significant differences exist at the .05 level between the stress levels.
The output of post hoc test will help in determining the Tukey HSD results by looking into the values of p when p < .05, indicating significant differences among the groups.
Thus, all the p-values obtained from the Tukey HSD results are greater than .05; thus, there are no significant differences between stress levels. On the contrary, any p-value less than .05 indicates the presence of a statistically significant difference in the pairwise stress levels.
Chi-Square Tests
Problem Set 4.8: Critical Values
Criterion: Explain changes in critical value based on calculations.
Instructions: Read the following and answer the questions.
The chi-square table. The degrees of freedom for a given test are listed in the column to the far left; the level of significance is listed in the top row to the right. These are the only two values you need to find the critical values for a chi-square test.
Work through the following exercise and write down what you see in the chi-square table. This will help familiarize you with the table.
Increasing k and α in the chi-square table:
- Record the critical values for a chi-square test, given the following values for k at each level of significance:
| .10 | .05 | .01 | |
| k = 10 | 14.684 | 16.919 | 21.666 |
| k = 16 | 22.307 | 24.996 | 30.578 |
| k = 22 | 29.615 | 32.671 | 39.364 |
| k = 30 | 37.566 | 40.256 | 47.962 |
Note: Because there is only one k given, assume this is a goodness-of-fit test and compute the degrees of freedom as (k − 1).
- As the level of significance increases (from .01 to .10), does the critical value increase or decrease? Explain.
As the level of significance (‘ alpha ‘) increases from .01 to .10, the critical value becomes smaller. This is true because at a higher level of significance (‘ alpha ‘), there is a greater probability of rejecting the null hypothesis or falsifying it. Hence, the level of significance becomes low. Thus as the classic chi-square critical value depends on the alpha threshold to reach significance, it is lessened.
- As k increases (from 10 to 30), does the critical value increase or decrease? Explain your answer as it relates to the test statistic.
As k is increased from 10 to 30, so does the critical value. The degrees of freedom increase, thus shifting the chi-square distribution to the right (df = k – 1). The distribution becomes more spread out with an increase in df and tends to need a higher critical value for signifying. Hence, for every given significance level (α), the critical value for rejecting the null hypothesis increases as k increases.
Problem Set 4.9: Parametric Tests
Criterion: Identify parametric tests.
Instructions: Based on the scale of measurement for the data, identify if a test is parametric or nonparametric.
- A researcher measures the proportion of schizophrenic patients born in each season.
Testing for this scenario would use a nonparametric test since it concerns categorical variables (nominal), with specific reference to the proportion of schizophrenic patients born in each season. Because parametric tests need data of interval or ratio types with the assumption of a normal distribution, the most suitable method for analyzing these data would be a chi-square test for goodness of fit.
- A researcher measures the average age that schizophrenia is diagnosed among male and female patients.
The test for this scenario would be parametric since the data represent continuous variables (age measurement) on the ratio scale. The researcher is comparing the average age for diagnosis between two groups (male and female patients); thus, the parametric test of the independent samples t-test would be suitable, assuming a normal distribution with homogeneity of variance.
- A researcher tests whether frequency of Internet use and social interaction are independent.
This is a nonparametric test since it deals with categorical data. Since the researcher is checking to see if frequency of Internet use and social interaction are independent, the chi-square test for independence is the proper statistical test to use.
- A researcher measures the amount of time (in seconds) that a group of teenagers uses the Internet for school-related and non-school-related purposes.
Since time (in seconds) is measured on a ratio scale, the scenario under consideration would be tested parametrically. A paired t-test or a repeated-measures ANOVA would be suitable if the same subjects were tested under both conditions, that would be school-related and non-school-related.
Problem Set 4.10: Chi-Square Analysis in JASP
Criterion: Use JASP for a chi-square analysis.
Data: Use the dataset yummy.jasp. Tandy’s ice cream shop serves chocolate, vanilla, and strawberry ice cream. Tandy wants to plan for the future years. She knows that on average she expects to purchase 100 cases of chocolate, 75 cases of vanilla, and 25 cases of strawberry (4:3:1). This year, she purchased 133 cases of chocolate, 82 cases of vanilla, and 33 cases of strawberry. The dataset yummy.jasp is a record of ice cream sales this year.
Instructions: Complete the steps below.
- Download yummy.jasp. Double-click the icon to open the dataset in JASP.
- In the Toolbar, click Frequencies. In the menu that appears, under Classical, select Multinomial Test.
- Select Flavor and then click the upper Arrow to send it over to the Factor box.
- Select Frequency and then click the lower Arrow to send it over to the Counts box.
- Click the circle next to Expected Proportions (χ2).
- Fill in 4 for Chocolate, 1 for strawberry, and 3 for Vanilla.
- Select the box for Descriptives and click the circle next to Proportions.
- Copy and paste the output to the Word document.
- Answer this: Was Tandy’s distribution of proportions the same as expected?
The distribution of sales of ice creams at Tandy proved to be different from the expected proportions. A chi-square test for goodness-of-fit therefore considers the question of whether the observed frequencies differed significantly from the expected frequencies based on a 4:3:1 ratio (100 chocolate, 75 vanilla, 25 strawberry). The statistical output gives the value of chi-square (χ²), degrees of freedom (df), and p-value (p). If p is less than .05, that means there is a statistically significant difference, and thus the actual distribution of Tandy’s ice cream sales is not in accordance with the expected proportions.
Multinomial Test
| χ² | df | p-value |
| 7.656 | 2 | 0.022 |
Regression
Problem Set 4.11: Analysis of Regression in JASP
Criterion: Use JASP to complete an analysis of regression to determine if the variable age is a predictor of the variable life satisfaction.
Data: Use the dataset satisfaction.jasp. This dataset is a record of responses to a survey which asked participants of various ages to rate their level of life satisfaction on a 1–10 scale, with 1 being “very dissatisfied” and 10 being “completely satisfied”:
Instruction: Complete steps below.
- Download satisfaction.jasp. Double-click the icon to open the dataset in JASP.
- In the Toolbar, click Regression. In the menu that appears, under Classical, select Linear regression.
- Select Life Satisfaction and then click the upper Arrow to send it over to the Dependent box.
- Set Method to “Enter.”
- Select Age and then click the Arrow to send it over to the Covariates box.
- Under Statistics, select Descriptives, Estimates, and Model Fit and deselect all other boxes.
- Copy and paste the output to this Word document.
Linear Regression
| Model | R | R² | Adjusted R² | RMSE |
| H₀ | 0.000 | 0.000 | 0.000 | 1.491 |
| H₁ | 0.479 | 0.230 | 0.133 | 1.388 |
Problem Set 4.12: Analysis of Regression in Excel
Criterion: Use Excel to complete an analysis of regression.
Data: Use the data from this table
| X (Age in Years) | Y (Life Satisfaction) |
| 18 | 6 |
| 18 | 8 |
| 26 | 7 |
| 28 | 5 |
| 32 | 9 |
| 19 | 8 |
| 21 | 5 |
| 20 | 6 |
| 25 | 7 |
| 42 | 9 |
Instructions: Complete the following steps.
- Open Excel and work in a new sheet.
- Enter the data from the table in Problem Set 4.11. Cell A1 will be X. Cell B1 will be Y. Then, enter the data below.
- Go to the tool bar, click Data Analysis, and select Regression.
- Put a check next to Labels and Confidence Level.
- In Input Y Range: $B$1:$B$11, In Input X Range: $A$1:$A$11
- Select Ok. Your data will appear in a new Sheet to the left.
- Copy and paste the output to this document
Problem Set 4.13: Identify Tests for Ordinal Data
Criterion: Identify tests for ordinal data.
Instructions: Read the following and answer the questions.
Identify the appropriate nonparametric test for each of the following examples and explain why a nonparametric test is appropriate.
- A researcher measures fear as the time it takes to walk across a presumably scary portion of campus. The times (in seconds) that it took a sample of 12 participants were 8, 12, 15, 13, 12, 10, 6, 10, 9, 15, 50, and 52.
The nonparametric test suitable for this case is the Mann-Whitney U test (when assessing two independent groups) or Wilcoxon signed-rank test (when assessing related samples). A nonparametric test would be suitable because the data would not become normal (as they are skewed) due to outlying values of 50 and 52 seconds. Nonparametric tests do not assume normal distributions and are more robust against outliers.
- Two groups of participants were given 5 minutes to complete a puzzle. The participants were told that the puzzle would be easy. In truth, in one group, the puzzle had a solution (Group Solution), and in the second group, the puzzle had no solution (Group No Solution). The researchers measured stress levels and found that frustration levels were low for all participants in Group Solution and for all but a few participants who showed strikingly high levels of stress in Group No Solution.
Certainly. It is Mann-Whitney U test as a nonparametric test that can fit this example. This is because it’s a study viewing the comparison of two independent groups (Group Solution versus Group No Solution) in terms of their stress levels. Data would also be nonparametric because all of the participants within Group No Solution are expected to show mostly low stress and then only a select few would have incredibly high scores-what breaches the assumption of normality associated with parametric tests such as the independent t-test.
- The appropriate nonparametric test for this example is Mann-Whitney U because the study compares stress levels between two independent groups (Solution vs. No Solution). Why was nonparametric because data are skewed such that most people under Group No Solution tend to have low stress levels but only a few have very high stress periods. This violates the assumption of normality for parametric tests, such as an independent t-test.
Mann-Whitney U test is an appropriate nonparametric test for this example because it examines differences between two independent groups when measuring stress (Solution vs. No Solution). Because the data are skewed, with most participants in the No Solution group having low stress levels but having a few scores showing extreme high stress, a nonparametric test is required. Therefore, the assumption of normality intrinsic in parametric tests (for example, the independent t-test) is violated.
- A researcher measured student scores on an identical assignment to see how well students perform for different types of professors. In Group Adviser, their professor was also their adviser; in Group Major, their professor taught in their major field of study; in Group Nonmajor, their professor did not teach in their major field of study. Student scores were ranked in each class, and the differences in ranks were compared.
The proper solution for dealing with this case, a bigger nonparametric test than the Wilcoxon tests, lasts again in the Kruskal-Wallis H test, since the study concerns student scores in three independent groups (Adviser, Major, and Nonmajor). Since the actual data were in ranking order, a nonparametric test was applicable for this case. An ordinal data treatment does not assume normal distribution for its error, thus making this test suitable.
- A researcher has the same participants rank two types of advertisements for the same product. Differences in ranks for each advertisement were compared.
In this case, the Wilcoxon signed-rank test is the fitting nonparametric test as it analyzes in pairs the same subjects ranking two different advertisements. A nonparametric test is most appropriate since the data are ordinal (ranked) and may not be normally distributed, which is an assumption for parametric testing like the paired t-test.
- A professor measures student motivation before, during, and after a statistics course in a given semester. Student motivation was ranked at each time in the semester, and the differences in ranks were compared.
The Friedman test is the fitting nonparametric test for this example, given that the study considers students’ motivation under repeated measures at three different points in time; that is, before, during, and after the course. The nonparametric test fits since the data are ordinal (ranked) and may not be assumed to be normal under the repeated measures ANOVA.