One Sample T-Test

Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

One sample t-test

Assume the mean SAT score of students admitted to New Era University is 1090. Thus, the
university mean of 1090 is the population mean (m). The population standard deviation is
unknown. The members of the biology department believe that students who decide to major in
biology have higher SAT scores than the general population of students at the university.

Steps in Hypothesis testing


1. State research question
○ Does the Biology department have higher SAT scores from the university
population?
2. State the hypothesis
○ Null: The biology department have lower scores than the general population of
students at the university.
○ Alternative: The biology department have higher scores than the general
population of students at the university.
3. Determine the appropriate test
○ One sample t-test
4. Select alpha level
○ Let α = . 05
5. State the decision rule
○ If p < .05, reject the null hypothesis.
6. Run the test

----------------------------------------------------------------------
Open SPSS
1. Input the data into the ‘Data View’.
2. Edit the Data in the ‘Variable View’
- Since the data are ratio, we’ll use scale measurement

3. Analyze the data > Compare means > One-sample T Test

4. Testing variable: Biology scores (sample mean)


Test Value: 1090 (Population mean)
5. Click options > Continue > OK

----------------------------------------------------------------------
Table 1. Descriptive Statistics

Table 2. One sample T-test result

7. State the statistical conclusion.


To know if there’s a significant difference:
- Look at the column ‘Sig. (2-tailed)’. However, the SPSS one-sample test only
gives 2-tailed results and since our problem is one-tailed (directional), we still
have to divide it by 2.
- . 069 ÷ 2 = . 0345
Reject the null hypothesis. The biology department have higher scores than the general
population of students at the university, t (9) = 2.06, p = .035 (one-tailed). The biology
department has a mean of 1176, higher than the university mean of 1090.
Note:
Degrees of freedom
- Describes the number of scores in a sample that are free to vary. Because
the sample mean places a restriction on the value of one score in the
sample, there are n-1 degrees of freedom for a sample with n scores.
- df = n -1

T-score
- Any t-value greater than +2 or less than -2 is acceptable (meaning the two
groups being compared are significantly different from each other)
- If the t-value is equal to 0, then they don’t have a significant difference (equals
the null hypothesis precisely).
- As the sample data become dissimilar from the null hypothesis, the absolute
value of the t-value increases.

Summary:
- One sample t-test compares the sample mean to a given population mean.
- Perform the steps in hypothesis testing
1. State research question
2. State hypothesis (null & alternative)
3. Determine the appropriate test
4. Select alpha level (which is always .05)
5. State decision rule (If p < .05, reject the null hypothesis.)
6. Run the test
a. Open SPSS
b. Data View
- input the data (values) in one column
c. Variable View
- Edit: Name (use underscore for spaces); Decimals (zero, we won’t
use decimals); Measurement (select ‘scales’ for ratio values)
d. Analyze the date > Compare means > One-sample T Test
e. Testing variable: (sample mean); Test Value: (Population mean)
f. Click options > 95%, Exclude cases analysis by analysis > Continue >
OK
g. Table 1. Descriptive statistics
h. Table 2. T-test Result
7. State the statistical conclusion
a. Divide ‘Sig. (2-tailed)’ result by 2.
b. State if reject or failed to reject.
c. Needed info: t-value, df, p value, sample mean, population mean
d. Format: [Reject/Failed to reject] the null hypothesis. The [sample] have
higher scores than the general population, t (df) = [t-value], p = [p-value]
(one-tailed). The [sample] has a mean of ____, higher than the
[population] ____.
T-test for Independent means

A researcher wants to study the effects on exam performance of massed versus spaced
study. All subjects in the experiment study the same material for the same amount of time. The
difference between the groups is that one group studies for 6 hours all at once (massed study),
whereas the other group studies for 6 hours broken into three 2-hour blocks (spaced study).

Steps in Hypothesis testing


1. State the research question
a. Is there a significant difference in the exam performance of students between
spaced study and massed study?
2. State the hypothesis
a. Null hypothesis: There is no significant difference in the exam performance of
students between spaced study and massed study.
b. Alternative hypothesis: There is a significant difference in the exam performance
of students between spaced study and massed study.
3. Determine the appropriate test
—T-test for Independent means
4. Select alpha level
—Let α = . 05
5. State decision rule
—If p < .05, reject the null hypothesis
6. Run the test

----------------------------------------------------------------------
Open SPSS
● We have two variables: spaced study & massed study
● We’ll code the two groups (1) and (2) respectively in one column.
1. Input the data in the ‘Data View’

2. Edit the Data in the ‘Variable View’

Variable 1
Name: Types_of_Study
Decimals: zero (0)
Values
● Value: Input code
● Label: Input label
● Click Add > OK
Measure: Ordinal

Variable 2
Name: Income
Decimals: zero (0)
Measure: Scale (ratio)
3. Analyze the data > Compare means > Independent Samples T Test

4. Testing variable (s): Exam_scores (ano ‘yung gustong pagkomparahan)


Grouping Variable: Types_of_Study (ano ‘yung pagkokomparahan)

Click Define groups


- Input the codes for the groups

5. Click options > 95%, Exclude cases analysis by analysis > Continue > OK

----------------------------------------------------------------------
Table 1. Descriptive Statistics

Table 2. T-test Results

7. State the statistical conclusion


To know if there’s a significant difference:

In the Levene’s test result, look up the ‘Sig.’ value: equal to p


- If p > .05, use data in the first row (equal variances assumed)
- If p ≤ .05, use data in the second row (equal variances not assumed)
Then, look up the ‘Sig. (2-tailed)
- If p < .05, reject the null hypothesis.

Conclusion:
Reject the null hypothesis. There is a significant difference in the exam performance of
students between spaced study and massed study, t(18) = 4.92, p = .000. The mean
score of spaced study is 22 which is significantly greater than mean scores of massed
study which is 16.80.

Summary:
- Compares the means of two different sample groups of participants.
- Perform the steps in hypothesis testing
1. State research question
2. State hypothesis
3. Determine appropriate test
4. Select alpha level
5. State decision rule
6. Run the test
a. Open SPSS
b. Data View
- Input the data, one column for the coded groups (1 and 2),
another column for the values/ scores
c. Variable View
- Variable 1: Name; Decimals; Values (Input the code and label of
two groups); Measure (Nominal)
- Variable 2: Name; Decimals; Measure (Scale)
d. Analyze the date > Compare means > Independent Samples T Test
e. Testing Variable(s): values; Grouping Variable: two independent groups
f. Click options > 95%, Exclude cases analysis by analysis > Continue >
OK
g. Table 1. Descriptive statistics
h. Table 2. T-test Result
7. State the statistical conclusion
a. Look up Levene’s test result (‘Sig.’ value)
- If p > .05, use data in the first row (equal variances assumed)
- If p ≤ .05, use data in the second row (equal variances not
assumed)
b. Look up the ‘Sig. (2-tailed)
- If p < .05, reject the null hypothesis.
c. State if reject or failed to reject.
d. Needed info: t-value, df, p value, mean scores of two groups
e. Format: [Reject] the null hypothesis. There is a significant difference in
the ______ between [first group] and [second group], t (df) = [t-value], p =
[p-value]. The mean score of [first group] is ___ which is significantly
greater than mean scores of [second group] which is ____.

[Failed] to reject the null hypothesis. There is no significant difference in


the ______ between [first group] and [second group], t (df) = [t-value], p =
[p-value]. The mean score of [first group] is ___ which is almost the
same as the mean scores of [second group] which is ____.
T-test for Dependent mean

To illustrate the use of the correlated-groups t test, imagine that we conduct a study in which
subjects are asked to learn two lists of words. One list is composed of 20 concrete words (for
example, desk, lamp, bus); the other is 20 abstract words (for example, love, hate, deity). Each
subject is tested twice, once in each condition

Steps in Hypothesis testing


1. State research question
a. Is there a significant difference in the number of recalled words between the
abstract and concrete words?
2. State hypothesis
a. Null: There is no significant difference in the number of recalled words between
the abstract and concrete words.
b. Alternative: There is a significant difference in the number of recalled words
between the abstract and concrete words.
3. Determine the appropriate test
—T-test for Dependent means
4. Select alpha level
—Let α = . 05
5. State decision rule
—If p < .05, reject the null hypothesis
6. Run the test
----------------------------------------------------------------------
Open SPSS
1. Input data into the ‘Data View’

2. Edit the Data in the ‘Variable View’


Variable 1
Name: Concrete_Words
Decimals: zero (0)
Measure: Scale (ratio)
Variable 2
Name: Abstract_Words
Decimals: zero (0)
Measure: Scale (ratio)

3. Analyze the data > Compare means > Paired Samples T Test
4. Click arrow to place the groups respectively in the right side

5. Click options > 95%, Exclude cases analysis by analysis > Continue > OK
----------------------------------------------------------------------

Table 1. Descriptive Statistics

Table 2. T-test Results


7. State the statistical conclusion.
—Reject the null hypothesis. There is a significant difference in the self-esteem score
of the group of girls before and after playing sports, t (7)= 3.82, p = .007. The mean
score of the number of recalled concrete words is 13.25 which is greater than the mean
score of the number of recalled abstract words which is 10.75.
ANOVA

1. State research question


a. Is there a significant difference in the level of years with the current employer and
their income?
2. State hypothesis
a. Null: There is no significant difference in the level of years with the current
employer and their income.
b. Alternative: There is a significant difference in the level of years with the current
employer and their income.
3. Determine appropriate test
a. One-way analysis of variance (ANOVA)
4. Select alpha level: .05
5. State decision rule
a. If p < .05, reject the null hypothesis.
6. Run the test
----------------------------------------------------------------------
Open SPSS
1. Input data into the ‘Data View’

2. Edit data in the ‘Variable View’


Variable 1
Name: Employee_Category
Decimals: 0
Values
○ Value: Input code
○ Label: Input label
○ Click Add > OK
3. Analyze the data > Compare means > One-way ANOVA
4. Dependent list: Dependent variable, Factor: Independent variable
5. Click Post Hoc> Equal variances assumed (Tukey), Equal variances not assumed
(Dunnett’s T3), Sig. level: 0.05> Continue
6. Click Options > Check Descriptive & Homogeneity of variance test>Exclude cases
analysis by analysis > Continue > OK

----------------------------------------------------------------------

Table 1. Descriptive Statistics

Table 2. ANOVA result

Since p<.05, there is a significant difference in the level of years with the current employer and
their income. To determine which kind of post-hoc test to use, Levene’s test for homogeneity of
variances was performed. The result of this test is shown on Table 3.

Table 3. Result of the Levene’s test for homogeneity of variances

Since the value of p<.05, it indicates that equal variances are not assumed. We will use
Dunnette’s T3 data.
Table 4. Result of post-hoc tests.

7. State the statistical conclusion


Conclusion 1 (Less than 5 and 5 to 15) = Reject the null hypothesis because there is a
significant difference in the level of years with the current employer and their income (p =
.000)

Conclusion 2 (5 to 15 and More than 15) Reject the null hypothesis because there is a
significant difference in the level of years with the current employer and their income (p =
.000)

Conclusion 3 (More than 15 and Less than 5) Reject the null hypothesis because there
is a significant difference in the level of years with the current employer and their income
(p = .000)

Overall conclusion
—There is a significant difference in the level of years with the current employer and
their income, F (2, 6397) = 1054.21, p = .000
Correlational Research
1. State research question
a. Is there a significant relationship between the weight and height of respondents?
2. State hypothesis
a. Null: There is no significant relationship between the weight and height of
respondents.
b. Alternative: There is a significant relationship between the weight and height of
respondents.
3. Determine appropriate test
— Pearson’s r

4. Select alpha level


—let α =. 05

5. State decision rule


—If 𝑝 <. 05, reject the null hypothesis

6. Run the test


----------------------------------------------------------------------
Open SPSS
1. Input the data into the ‘Data View’ (2 columns)
2. Edit the Data in the ‘Variable View’
Variable 1
Name: Weight
Decimals: zero
Measure: Scale

Variable 2
Name: Height
Decimals: zero
Measure: Scale

3. Graph > Legacy Dialogs > Scatter/Dot


4. Analyze > Correlate > Bivariate

5. Select the 2 variables (weight and height) > Under Correlation Coefficient, check
Pearson > Under Test of Significance, select Two-tailed
6. Click options > Check Means and standard deviation > Continue > OK

----------------------------------------------------------------------
Table 1: Descriptive Statistics

Table 2: Graph
Table 3: Result of Correlation

Since the p<.05, reject the null hypothesis. Looking at Pearson's r .944, it indicates a
positive strong relationship.

7. State the statistical conclusion


Reject the null hypothesis. There is a significant relationship between the weight and
height of respondents (r = .944, p = .000).
Regression analysis
1. State research question
a. How well does Math grade predict English grade ?
b. How much variance in the English grade can be explained by Math grade?
2. State hypothesis
a. Null: Math grade is not a predictor of English grade.
b. Alternative: Math grade is a predictor.
3. Determine appropriate test
— Simple regression analysis

4. Select alpha level


—let α =. 05

5. State decision rule


—If 𝑝 <. 05, the null hypothesis is rejected

6. Run the test


Table 1: Descriptive Statistics

Table 2: Correlation result

Since p<.05, reject the null hypothesis. Looking at the pearson’s r value Math grade is
strongly positively correlated with English grade (r=.723., p = .009)

Table 3. ANOVA result


Since the p < .05, the model is significant.

Table 4. Model Summary

The R-square value of .523 indicates that 52.3% of the variance of English grade can be
explained by Math grade.

Table 5. Coefficient Table

The unstandardized beta of .871 indicates that for every one unit increase in Math
grade, a .871 increase in English grade can also be predicted.

7. State the statistical conclusion


The analysis revealed that Math grade has a significant positive relationship with English
grade (B= .871, p= .018). Math grade accounts for 52.3% of the variance in English
grade, F (1,8) = 8.76, p = .018.
Chi-square Test of Goodness-of-fit

1. State research question


a. Is there a significant difference in the number of accident reports by age category
of registered drivers?

2. State hypothesis
a. Null: There is no significant difference in the number of accident reports by age
category of registered drivers.
b. Alternative: There is a significant difference in the number of accident reports by
age category of registered drivers.

3. Determine appropriate test


— Chi-square Test of Goodness-of-fit

4. Select alpha level


—let α =. 05

5. State decision rule


—If 𝑝 <. 05, the null hypothesis is rejected

6. Run the test


Table 1. Descriptive Statistics

Table 2. Test Statistics Result


7. Statistical conclusion
Reject the null hypothesis. There is a significant difference in the number of accident
reports by age category of registered drivers, p = .000. Age 30 or older have the most
number of accident reports.

You might also like