## T Tests_SPSS

**Assignment 4: t Tests**

**The one sample t Test for a mean**

A market research company found that children in America between the ages of 5 and 12 years old watch on average 196 minutes of TV per day. A survey was conducted by randomly selecting 20 British children within this age group to see if British Children are statistically different in the amount of TV watched per night from their American counterparts.

Based on this example answer the following questions:

- Why is a one sample
*t*Test the most appropriate technique to test the example? - State (in words) the
*null*and the*alternate* - Use the data set provided and conduct a one sample
*t*Test using SPSS.

__Hint:__ Once you are in the **One Sample t Test** dialogue box in SPSS, your test value will be 196 (minutes).

- What is the
*Mean*number of minutes watched per night? - What is the
*t*statistic? - What is the
*p*value or significance? - Discuss the findings in regard to the
*null*and*alternate*hypothesis using Morgan et al. (2002)

**The two samples ttest for the equality of Means**

A survey was conducted by randomly selecting 20 American children and 20 British children to determine if there is a statistical difference in amount of time they watch TV.Based on this example answer the following questions:

- Why is a two samples
*t*test most appropriate technique for this research example? - State (in words) the
*null*and the*alternate* - Use the data set provided and conduct a two samples
*t*test using SPSS. Use the SPSS command/actions listed below to conduct the analysis:

__Hint__: Once you are in the **Independent-Samples t Test** dialog box in SPSS, you will have to Define your groups.

- Click on
**Define Groups** - In the area next to
**Group 1**: type**1**, and in the next to Group**2**: type**2** - Click on
**Continue** - Click on
**OK**

- What is the
*mean*number of minutes of TV watched by the British children? - What is the
*mean*number of minutes of TV watched by the American children? - In the Equal Variances Assumed row, what is the
*t*statistic? - What is the
*p*value or significance? - Discuss the findings in regard to the
*null*and*alternate*hypothesis using Morgan et al. (2002) pp. 10-12. - Why might these results be inaccurate due to the technique of Random Sampling (see Creswell, 2008)?

**Calculate the Effect size (Cohen’s d) for the paired samples ttest output:**

Use the following equation: *d* = *M*_{1} – *M*_{2}/*σ*_{D} (Mean of Post-total Social Competency – Mean of Pre-total Social Competency)/Paired Differences Std. Deviation

Cohen (1988) defined effect sizes as “small, *d* = .2,” “medium, *d* = .5,” and “large, *d* = .8″, stating that “there is a certain risk in inherent in offering conventional operational definitions for those terms for use in power analysis in as diverse a field of inquiry as behavioral science”.

Discuss the meaning of the findings (1-2 sentences).** **

**Solution**

** Assignment 4**

**1.**

A one sample t-Test is the most appropriate technique to test the research as they are studying one subject (American and British children). The one sample t test compares the mean (196 minutes) with the known population.

2.

Null hypothesis: British children are not statistically different from American children regarding TV watching.

Alternative Hypothesis: British children are statistically different from American children regarding TV watching.

3.

One-Sample Statistics | ||||

N | Mean | Std. Deviation | Std. Error Mean | |

TV watched per night in minutes | 20 | 165.85 | 29.290 | 6.550 |

One-Sample Test | ||||||

Test Value = 196 | ||||||

t | df | Sig. (2-tailed) | Mean Difference | 95% Confidence Interval of the Difference | ||

Lower | Upper | |||||

TV watched per night in minutes | -4.603 | 19 | .000 | -30.150 | -43.86 | -16.44 |

4.

165.85 is the Mean number of minutes watched per night.

5.

The t-statistics is -4.603

6.

The P-value is .000

7.

Given that t (20) = -4.603 with a p < 0001, Signify that the level of significance is less than .05. This denotes a failure to accept or reject the null hypothesis. In the case of determining statistically if there is a difference between the amount of TV watched per day by American children and British children, the results of a single t test suggests that there were significant differences.

Fail to accept the null hypothesis t=-4.603 all. The alternative hypothesis is t>-4.603. The only difference between the null and alternative hypothesis is that the possible value of the population parameter included within Ha will always differ from Ho. What we really think will occur.

1.

There are two normally distributed but independent populations with separate samples containing different sets of individual subjects and this test compares the groups to infer some type of differences between the groups. The 20 American children and 20 British children are the two groups under study. The Independent Means application is the appropriate type of t test to get the scores.

2.

Null- There is no significant difference between the amount of time American children and British children watch T.V. The Means are equal.

Alternative-There is significant difference between the amount of time American children and British children watch T.V. The Means are not equal.

3.

Group Statistics | |||||

Country of residence | N | Mean | Std. Deviation | Std. Error Mean | |

Minutes of TV watched per night | America | 20 | 165.85 | 29.290 | 6.550 |

Britain | 20 | 186.75 | 29.563 | 6.611 |

4.

186.75 is the mean number of minutes of British children who watched TV.

5.

165.85 is the mean number of minutes of American children who watched TV.

6.

The t statistic is -2.246.

7.

The p value of significance is .031

8.

A two-sample t test was conducted. The null hypothesis is false therefore the researcher would reject. This means the Alternative hypothesis is true because the means are different. This test suggests that with a t of -2.246 and a df of 38 and level of significance of .031 which is less than .05 the alpha level of significance, we conclude that there was a significant difference between the children in America and Britain with regards to watching TV, so we will reject the null hypothesis.

9.

There are always observable differences between the means of any two groups; this is due in part to chance random events or just dumb luck.

Social competency in pair 1 indicates that the participants did not make sufficient gains, t (45) = -3.229, p < .002. The null hypothesis is false therefore the researcher would reject. This means that Alternative hypothesis is true because the means are different. d= (100.487-113.87)/18.695 SD

d=-.4814. In this case, the effect size is small. The effect size (d) for these gains was small.

**Assignment 5: ANOVA**** **

**Open the divorce.sav data file and run the one-way ANOVA to answer the following question:**

What are the effects of marital status on life satisfaction?

- State the independent and dependent variables.
- State the null and alternate hypotheses.
- Run the appropriate analysis using SPSS (Hint: Use the General Linear Models and Univariate Procedure. Select Estimates of Effect Size under the Options tab).
- What are the mean and standard deviation for each of the levels of the IV?
- Report the appropriate F statistic, degrees of freedom, p value, and eta squared (η
^{2}). - What is your decision regarding the null hypothesis (i.e., did you reject or fail to reject the null)? Explain your decision (1 sentence)
- Using Morgan et al text. write up a sample results section.

**Use the goggles.sav data to run a two-way ANOVA. Consider the following example and then answer the subsequent questions:**

Derived from Field (2005), an anthropologist was interested in the effects of alcohol on mate selection at night-clubs. Her rationale was that after alcohol had been consumed, subjective perception of physical attractiveness would become more inaccurate. She was also interested in whether this effect was different for men and women. She picked 48 students: 24 male and 24 female. She then took groups of eight participants to a night-club and gave them either a non-alcoholic lager, 2 pints of strong lager, or 4 pints of strong lager. At the evening she took a photograph of the person that the participant was chatting up. She then got a pool of independent judges to assess the attractiveness of the person in each photograph (out of 100).

- State the independent variables and the dependent variable.
- State the null and alternate hypotheses.
- Run the appropriate analysis and include the Levene’s (Homogeneity of Variance) test and the test of Between-Subjects Effects (Cut and Paste Levene’s Test Output Below – Explain the meaning of this test).

**Tests of Between-Subjects Effects (Include Data from Output in the Figure Provided Below)**** **

Source | Df | Mean Square | F | Sig. |

Gender | ||||

Alcohol
| ||||

Gender*alcohol |

- Report the mean and standard deviation for each level of the IV (Cut and Paste Output).
- What is your decision concerning the null hypothesis (i.e., did you reject or fail to reject the null)? Explain your response.
- Post the Estimated Marginal Means of Attractiveness of Data .
- Using Morgan et al, write up a sample results section.

**Solution**

** Assignment 5**

What are the effects of marital status on life satisfaction?

a.

Marital status is Independent variable.

Life satisfaction is Dependent variable.

b.

The null hypothesis is that there is no significant difference in life satisfaction based on marital status.

The alternate hypothesis is that there is significant difference in life satisfaction based on marital status.

c.

Between-Subjects Factors | |||

Value Label | N | ||

current marital status | 1 | marred | 55 |

2 | separated | 34 | |

3 | divorced or DTS | 112 | |

4 | widowed | 3 | |

5 | cohabit | 25 |

Descriptive Statistics | |||

Dependent Variable: life satisfaction | |||

current marital status | Mean | Std. Deviation | N |

marred | 4.9362 | .79650 | 55 |

separated | 4.5335 | 1.03186 | 34 |

divorced or DTS | 4.8241 | .85747 | 112 |

widowed | 4.6133 | 2.12660 | 3 |

cohabit | 4.9152 | .88940 | 25 |

Total | 4.8151 | .89571 | 229 |

d.

Married – The mean is 4.936. The standard deviation is .121

Separated – The mean is 4.534. The standard deviation is .153

Divorced or DTS – The mean is 4.824. The standard deviation is .084

Widowed – The mean 4.613. The standard deviation is .516

Cohabit – The mean is 4.915. The standard deviation is .179

e.

Tests of Between-Subjects Effects | ||||||

Dependent Variable: life satisfaction | ||||||

Source | Type III Sum of Squares | df | Mean Square | F | Sig. | Partial Eta Squared |

Corrected Model | 3.884^{a} | 4 | .971 | 1.215 | .305 | .021 |

Intercept | 1320.218 | 1 | 1320.218 | 1651.762 | .000 | .881 |

status | 3.884 | 4 | .971 | 1.215 | .305 | .021 |

Error | 179.038 | 224 | .799 | |||

Total | 5492.225 | 229 | ||||

Corrected Total | 182.922 | 228 | ||||

a. R Squared = .021 (Adjusted R Squared = .004) |

F-statistics = 1.22

DF = 4

P-value = 0.305

Eta Squared = .021

f.

The researcher would fail to accept the null hypothesis (reject the null hypothesis) because the p value is more than .05.

g.

Subjects who were married, separated or cohabitating have little to no difference (12, 15, and 17). Whereas those who are widowed and those who are life satisfaction is significant don’t have a consistent sample size to make a determination. There are only 3 samples for the widowed category.

a.

The independent variables are gender (male/female) and the effects of alcohol.

The dependent variable is perception of physical attractiveness.

b.

The null hypothesis –

- Perception based on gender is that males have wide ranging effects over females.

The first null hypothesis is that there is no significant difference between the male and female perception of physical attractiveness and the means are equal, so we accept the null hypothesis.

- Perception based on alcohol.

The second hypothesis is that there is an interaction between males and females and the effects of alcohol so we would reject the null hypothesis.

- There is an interaction between gender and alcohol and the perception.
- The alternative hypothesis is that there is a significant difference in the perception of attractiveness by males compared to female participants after alcohol consumption. The means are significantly different so we reject the null hypothesis.

c.

Levene’s Test of Equality of Error Variances^{a} | |||

Dependent Variable: Attractiveness of Date | |||

F | df1 | df2 | Sig. |

1.527 | 5 | 42 | .202 |

Tests the null hypothesis that the error variance of the dependent variable is equal across groups. | |||

a. Design: Intercept + alcohol + gender + alcohol * gender |

WE can proceed with the ANOVA since the Levene’s test has a significance of .20 which is greater than .05. This indicates that the researcher meets the assumption of the test.

Source | DF | Mean square | F | Sig |

Gender | 1 | 168.750 | 2.032 | .161 |

Alcohol | 2 | 1666.146 | 20.065 | .000 |

Gender*Alcohol | 2 | 989.062 | 11.911 | .000 |

d.

Tests of Between-Subjects Effects | ||||||

Dependent Variable: Attractiveness of Date | ||||||

Source | Type III Sum of Squares | df | Mean Square | F | Sig. | Partial Eta Squared |

Corrected Model | 5479.167^{a} | 5 | 1095.833 | 13.197 | .000 | .611 |

Intercept | 163333.333 | 1 | 163333.333 | 1967.025 | .000 | .979 |

alcohol | 3332.292 | 2 | 1666.146 | 20.065 | .000 | .489 |

gender | 168.750 | 1 | 168.750 | 2.032 | .161 | .046 |

alcohol * gender | 1978.125 | 2 | 989.063 | 11.911 | .000 | .362 |

Error | 3487.500 | 42 | 83.036 | |||

Total | 172300.000 | 48 | ||||

Corrected Total | 8966.667 | 47 | ||||

a. R Squared = .611 (Adjusted R Squared = .565) |

**e**.

We would reject the null hypothesis because p is more than .05 since the means are not equal.

**f.**

1. Grand Mean | |||

Dependent Variable: Attractiveness of Date | |||

Mean | Std. Error | 95% Confidence Interval | |

Lower Bound | Upper Bound | ||

58.333 | 1.315 | 55.679 | 60.988 |

Gender | ||||

Dependent Variable: Attractiveness of Date | ||||

Gender | Mean | Std. Error | 95% Confidence Interval | |

Lower Bound | Upper Bound | |||

Male | 56.458 | 1.860 | 52.705 | 60.212 |

Female | 60.208 | 1.860 | 56.455 | 63.962 |

Alcohol Consumption | ||||

Dependent Variable: Attractiveness of Date | ||||

Alcohol Consumption | Mean | Std. Error | 95% Confidence Interval | |

Lower Bound | Upper Bound | |||

None | 63.750 | 2.278 | 59.153 | 68.347 |

2 Pints | 64.688 | 2.278 | 60.090 | 69.285 |

4 Pints | 46.562 | 2.278 | 41.965 | 51.160 |

**g**.

The attractiveness data (score) is lower when the subject has consumed 4 pints of alcohol. This scoring is increases with men than with women. The interaction effect shows that men are more influence by alcohol than women. The increase in consumption by males alcohol drinking causes women to be less attractive. Thus, plays a role in the companion that they choose. Men will chose an unattractive companion whereas, women won’t. Even when they are drinking, women are selective about the companion they choose.

**Assignment 6: Non-Parametrics**

**Chi-Square Test of Association (Independence)**

A school system is concerned about the low graduation rate among their high school students. The superintendent assigned a task force to research possible reasons that could explain the low graduation rate. The task force decided to conduct a preliminary literature review about current graduation rate research. The literature review signaled that among several key factors that are related to completion of high school is the development and execution of a school guidance intervention plan. The task force decided to investigate if such is the case in the high school with the highest dropout rate in their district. The following data was collected:

Valenti High School Data

Guidance Intervention Plan | ||

Students obtaining a high school diploma | No | Yes |

No | 577 | 46 |

Yes | 381 | 492 |

In order to run the chi-square test of association (aka, chi-square test of independence), open the file named:

assign 6 prob 1 data.sav

Under View > Value labels you can toggle between the variable category label (no, yes) or the dummy codes (numeric representation) for the category label (0 = no, 1 = yes)

Make sure you review both the “Data view” and “Variable view” so you understand the variable types and other properties – and how the variables were created and entered.

Go to Analyze > Descriptive statistics > Frequencies, and move the two variables to the “Variables” box, then click “ok”

This gives you the frequencies and percents of each of the variables

To run the chi-square of association test, go to Analyze > Descriptive statistics > Crosstabs, then move High School Diploma (HSD) to the “Row” box, and Guidance Intervention Plan (GIP) to the “Column” box

Select “Statistics” then select the “Chi square” and “Phi and Cramer’s V” boxes

Click “Continue”

Select “Cells” then select “Observed” and “Expected” under “Counts” (“Round cell counts” is selected by default)

Click “Continue” then “ok”

You will use the output for questions 1-3.

You were asked to analyze the data and present the findings in the upcoming school board meeting. Your report must include the following:

- A short explanation about the

- Chi-Square Test of Association
- The Case Processing Summary table
- Cross tabulation table
- Chi-square Tests table
- Clustered Bar Chart

- Write down the value of the Pearson chi-square and its associated tail probability (p-value). Is it significant? (Use the Morgan text pp. 36-38, for the APA style writeup)
- In terms of the experimental hypothesis, what has this test shown?

**Chi-Square Goodness of Fit Test**

Following are the cumulative number of AIDS cases reported for Neptune County through December 31, 2008, broken down by ethnicity:

Ethnicity | Actual Number of AIDS Cases |

White | 751 |

Hispanic | 225 |

African-American | 100 |

Asian, Pacific Islander | 36 |

Native American | 5 |

| Total = 1117 |

Ethnicity | Percentage of total county population | Expected cases by population |

1 = White | 51 | 570 |

2 = Hispanic | 23 | 257 |

3 = African-American | 4 | 45 |

4 = Asian, Pacific Islander | 21 | 235 |

5 = Native American | 1.0 | 10 |

| Total = 100% | Total = 1117 |

In order to run the chi-square goodness of fit test, open the file named:

assign 6 prob 2 data.sav

Under View >Value labels you can toggle between the variable category label (White, Hispanic, African American, Asian Pacific Islander, Native American) or the dummy codes (numeric representation) for the category label (1 = White, 2 = Hispanic, 3 = African American, 4 = Asian Pacific Islander, 5 = Native American). For this test, we want to compares the observed (actual) AIDS cases to the expected cases (frequencies, based on county population).

Go to Analyze >Nonparametric tests >Chi square

Move the AIDS variable to the “Test variable list” box

Using the “Expected cases by population” numbers that correspond to each ethnic group in the table above, under “Expected values” select, “Values” then add the 5 population percentages that correspond with the frequency in the sample, using “Add” for each (570 > Add, 257 > Add, 45 > Add, 235 > Add, 10 > Add)

Select “Descriptive” > Continue under “Options”

Click “ok”

You will use the output for questions 1-3.

Perform a goodness-of-fit test to determine whether the make-up of AIDS cases follows the ethnicity of the general population of Neptune County. State the following:

- Null Hypothesis
- Decision
- Reason for the Decision
- Does it appear that the pattern of AIDS cases in Neptune County corresponds to the distribution of ethnic groups in this county? Why or why not?
- You are asked to report your findings along with recommendations for prioritizing interventions by ethnic group to the County Health Commission. Write a one paragraph handout summarizing the findings and your recommendations. Also include the results, in APA style (Use the Morgan text pp. 36-38, for the APA style writeup).

**Solution**** **

** Assignment 6**

1.

**.**** Chi-Square Test of Association**

The chi-square test for independence, also called Pearson’s chi-square test or the chi-square test of association, is used to discover if there is a relationship between two categorical variables.

**. ****The Case Processing Summary table**

Case processing summary table shows the total number of valid cases or entry in the given dataset and the total number of missing entry in the dataset.

**. ****Cross tabulation table**

Cross tabulation table is a tool that allow us to compare the relationship between two variable. It gives the observed and expected count of each variable under each category. The total of observed and expected count will always be the same.

**. ****Chi-square Tests table**

Chi-square test table provide us the test statistics, degree of freedom, and the significance value for each applied test. It shows how likely it is that an observed distribution is due to chance.

**.**** Clustered Bar Chart**

A clustered bar chart is a type of bar graph that allows for the display of two categorical variables. It consists of a grid and some vertical or horizontal columns that are arranged in groups or clusters.

**2.**

From the chi square test we have Pearson chi square value and p value are 378.628 and 0.000. Since the p-value is less than the 5% level of significance, it can be said that the test is significant.

**3.**

Experimental hypothesis says that there is an association between Guidance intervention plan and High School Diploma. From the above results we have seen that the test has significant results and we are failed to accept the Null hypothesis.

Therefore we can conclude that there is an association between Guidance Intervention plan and the High School Diploma.

**Chi-Square Goodness of Fit Test**

**Null Hypothesis:**Number of AIDS cases follow the given distribution of ethnicity in the country.**Decision:**Reject the Null hypothesis.**Reason for the decision:**Since Asymp.sig (p-value) is 0.000 which is significantly less than the given level of significance.- Since we have rejected the null hypothesis , we have strong evidence to conclude that it doesn’t appear that pattern of AIDS cases in Neptune County corresponds to distribution of ethnic group in this country.
- In the Null hypothesis we have assumed that the distribution number of AIDS cases is the same as distribution of ethnicity group in the county. From the chi-square goodness of fit test gives us χ
^{2}test statistics = 299.697 with degree of freedom 4 and p-value <0.001. If we look at the expected and observed count of the given number of cases of AIDS, we will observe that White and Asian Pacific Islanderhas very large differences. These all finding suggests and support to reject the claim that the number of AIDS cases follows the given distribution of ethnicity in the county.