Вы находитесь на странице: 1из 18

Overview

Independent Sample t, Paired Sample t —  Understand the concept of parametric test


Test, One-Way ANOVA & Correlation —  Apply hypothesis testing
(Univariate analysis of numerical data) —  Select appropriate univariable parametric numerical test
—  Checking assumptions
—  Perform the analyses using SPSS
By —  Interpret SPSS output
Dr. Kueh Yee Cheng @ Erica, PhD
—  Present the results and make conclusion
Unit of Biostatistics & Research Methodology
School of Medical Sciences
Universiti Sains Malaysia
yckueh@usm.my

1 2

Parametric Test t test


—  Parametric tests are statistical tests which are based on —  Most widely used method to evaluate the differences in
knowledge that the data follow certain probability means between two groups.
distribution. —  It is a parametric test because it estimates parameters of
—  Non parametric tests referred to ‘distribution free tests’. some underlying normal distribution (t distribution).
—  Types of t test:
—  One sample t test
—  Independent t test
—  Paired t test

3 4
Two Sided Test One Sided Test
—  Or two tailed test —  One tailed test
—  Looking for differences without specifying whether the —  It specified a variable is expected to be significantly higher or
difference is numerically higher or lower lower than others.
—  Example of nondirectional hypotheses (two tailed test) —  Example of directional hypotheses (one tailed test)
—  There is a difference of BMI between the men and women. —  The alternative drug is superior to standard drug.
—  The mean age of volunteers differ from that of general —  The IQ of students in class A is higher than the IQ of students in
population class B.
—  Example of hypothesis, the mean of BMI is different between —  Example of hypothesis, the mean of BMI is higher in male
male and female teachers. than female teachers
—  H0: μmale – μfemale = 0 —  H0: μmale ≤ μfemale
—  HA: μmale – μfemale ≠ 0 —  HA: μmale > μfemale

5 6

Steps in Hypothesis Testing


—  Step 1: State the hypotheses (H0 and HA)
—  Step 2: Set the significance level (α = 0.05)
—  Step 3: Check assumptions of the appropriate parametric test
—  Step 4: Perform the statistical test (obtain the test statistic, p
value, & CI) Independent Sample t Test
—  Step 5: Make interpretation (based on p value & CI)
—  Step 6: Conclusion

7 8
Description Example
—  An statistical test to compare significant difference between —  A researcher conducted a study to assess the mean difference
the means of two independent groups of normally distributed of BMI level among students by gender in health campus,
data. USM
—  If the null hypothesis is true, the test statistic is distributed as —  Research hypothesis:
Student t with (n1 +n2-2) of df. There is a difference of BMI level between
male and female students in health campus,
USM.

9 10

Step 1: State the Hypotheses Step 2: Set the Significance Level


Null hypothesis: —  The significance level is set at 5% (α = 0.05, two tailed test).
There is no mean BMI difference between gender —  95% CI will be applied
H0: μ(BMI of female) = μ(BMI of male)
Alternative hypothesis:
There is a mean BMI difference between gender
HA: μ(BMI of female) ≠ μ(BMI of male)

11 12
Step 3: Checking the Assumption Step 3: Checking the assumption
—  The appropriate test is independent t test 1.  Random samples
—  Data is numerical outcome 2.  The two observation groups are
Research method & design
—  Two independent groups independent
—  Assumption for independent t test: 3.  In each group, the data distribution is normal (or sample
—  Random samples size >30)
—  Independent observations o  If sample size is more than 30 (n=50), normality can be assumed
—  In each group, observations are normally distributed (or sample size according to CLT
more than 30) o  Check normality using histogram graph
—  Variance are not different between the two groups (Homogeneity of
variance) 4.  Variance are not different between the two groups
—  If the assumption is not met, a comparable non parametric test
(Homogeneity of variance)
o  Check in Levene’s test, SPSS output
should be used (i.e., Mann Whitney test).

13 14

Step 3: Checking the assumption Step 4: Perform Statistical Test


—  Statistical test chosen is independent t test, because the study
1
compare two means of two independent variables and it met
the assumptions.
—  SPSS steps:
—  Analyze -> compare means -> independent t test
3 —  Test variable: BMI
2 —  Grouping variable: Gender – Define group
—  Click “OK”
4

15
Histogram of differences of pre and post weight (or weight loss) 16
Step 4: Perform Statistical Test Step 4: Perform Statistical Test

2 If this is significant, refer to the second line t-statistic result


4 Results:
•  t statistic = 1.80, df = 198, p-value = 0.074
•  Mean(SD) of BMI in female = 27.1 (4.85)
3
•  Mean (SD) of BMI in male = 25.8 (5.28)
•  Mean BMI difference = 1.29
5 •  95% CI of mean BMI difference is -0.12, 2.70
17 18

Step 5: Interpret the Results Step 6: Conclusion


—  The mean BMI between female and male students in USM
Making decision based on the SPSS output:
was not significantly different (p = 0.074, 95% CI of mean
Decide whether or not to reject the null hypothesis.
•  Compare the p-value with the level of significance set
difference: -0.12, 2.70).
•  Observe whether the 95% CI of mean difference across 0. —  The mean difference of BMI were small which was 1.29 and
it is not statistical significant.

—  We accept the null hypothesis since p-value = 0.074 and 95% CI


does across 0. Thus, we conclude on null hypothesis.

19 20
Presentation of Results (Table)
Table 1: Variables associated with gender among student in USM (n = 200)

b Significance level at 0.05


Paired t Test

21 22

Paired t test Example


—  Paired t test is a test statistic to see the difference between
—  A researcher conducted a study to assess the effectiveness of an
two dependent or paired/matched or related sample means. intensive exercise training program on a group of obese high
—  Two observations in same person (e.g., before and after
school students in Kubang Kerian, Kelantan.
intervention or treatment)
—  Research hypothesis:
—  Matched samples (e.g., case control matched by age, sex)
—  Closely related individuals (e.g., twin or siblings studies) The weight of participants is different before
—  If the null hypothesis is true, the test statistic is distributed as and after the program
students t with n-1 df

23 24
Step 1: State the hypotheses Step 2: Set the significance level
Null hypothesis: —  The significance level is set at 5% (α = 0.05, two tailed test).
There is no mean difference of weight before and after the —  95% CI will be applied
program (or the difference is zero) H0: μ(pre) = μ(post)
Alternative hypothesis:
There is a mean difference of weight before and after the
program (or the difference is not zero)
HA: μ(pre) ≠ μ(post)

25 26

Step 3: Checking the assumption Step 3: Checking the assumption


—  The appropriate test is paired t test 1.  Random samples
—  Data is numerical outcome 2.  The two observation groups Research method & design
—  Dependent observations are dependent
—  Assumption for independent t test: 3.  Normal distribution of mean difference
—  Random samples o  If sample size is more than 30, (e.g., n=50), normality can
—  Dependent observations be assumed according to CLT
—  The mean differences are normally distributed (or sample size is o  Otherwise, create a new variable, differences between pre
more than 30) and post, then plot a histogram using this new variable and
—  If the assumption is not met, a comparable non parametric assess the normality curve
test should be used (i.e., Wilcoxon signed rank test).

27 28
Step 3: Checking the assumption Step 3: Checking the assumption
2
1

2 3
3

4 Histogram of differences of pre and post weight (or weight loss)


29 30

Step 4: Perform Statistical Test Step 4: Perform Statistical Test


—  Statistical test chosen is paired sample t test, because the
study compare two means of two dependent variables and it
met the assumptions.
—  SPSS steps: 1
—  Analyze -> compare mean -> paired samples t test
—  Paired variable: Pre & Post
—  Click “OK”
2

3
31 32
Step 5: Interpret the Results Step 5: Interpret the Results
Making decision based on the SPSS output:
Decide whether or not to reject the null hypothesis.
•  Compare the p-value with the level of significance set
•  Observe whether the 95% CI of mean difference across 0.

—  We reject the null hypothesis since p-value < 0.001 and 95% CI
Results: does not across 0. Thus, we conclude on alternative hypothesis
—  t statistic = 12.19, df = 39, p-value < .001
—  Mean(SD) weight before the program = 94.9 (12.30) kg
—  Mean (SD) weight after the program = 77.8 (12.02) kg.
—  Mean weight difference = 17.1 kg
—  95% CI of mean difference: 14.28, 19.97

33 34

Step 6: Conclusion Presentation of Results (Table)


—  The mean weight before and after the intensive exercise Table 2: Pre and post intervention (intensive exercise training program; n = 40)
training program was significant different (p < 0.001, 95%CI
of mean difference: 14.28, 19.97)
—  The mean weight was lower after the exercise program. The
mean weight reduced by 17.1kg after the exercise program.
b Significance level at 0.05
—  We were 95% sure that the reduction of weight in the
Kubang Kerian high school obese students lies between
14.28, 19.97.

35 36
One-way ANOVA
Ø  Any data set has variability
Ø  Variability exists within groups…

Ø  and between groups

One-Way ANOVA Ø  ANOVA allows us to know whether this variability is


significant, or merely by chance.
Ø  It is call ‘One-way’ because each value is classified
in exactly one way (one factor group only)
—  E.g., comparisons by gender, ethnic, color, etc.

37 38

Characteristics of One-Way ANOVA One-way ANOVA test


Ø  The factor variable is the categorical variable being Ø  What hypotheses involved?
used to define the groups
—  Comparing 3 or more populations’ mean
—  We will assume k samples (groups)
—  One factor (categorical variable, e.g., education —  Therefore:
level, severity of a disease) —  Null Hypothesis (H0): µ1 = µ2 = µ3
Ø  The response variable is the variable you’re —  Alternative Hypothesis (HA): at least one pair is different
comparing
—  One response variable (numerical variable, e.g., IQ
scores, QOL scores)
Ø  More than two groups to compare

39 40
One-way ANOVA test
One-way ANOVA test (Using SPSS)
Example:
Ø There are four assumptions:
A researcher studied the attitudes of diabetes among people with
1.  Random samples T2DM. The researcher would like to know whether attitudes toward
study design and method
2.  Independent observations diabetes are the same among the three education levels?
§  What hypotheses? Step 1: State the hypotheses
3.  Normality of distribution (larger Check using
histogram, —  Comparing mean attitudes scores among 3 education levels
sample size required) boxplot
—  H0: There is no difference of mean attitudes scores between the 3
4. Variances are not Levene’s test
groups of education levels (µ1 = µ2 = µ3)
(obtained from —  HA: There is a difference of mean attitudes scores between the 3
different among groups SPSS’s output) groups of education levels (µ1 ≠ µ2 ≠ µ3)
§  Set α = .05 (two tailed) Step 2: Set the significance level

41 42

Checking the Assumptions How to Analyse?


Step 4: Perform the analysis
Step 3: Checking the assumptions

Select “descriptive”
1.  Is random sampling method applied? √ 5 to get the mean(SD)
1
Checking equal variances
2.  Are observations independent? √ 6
5
3.  Is sample size big (>30) in each group? If ?? (checked with
histogram)
not, is the data normally distributed? 6
2
4.  Are population variances equal among
???
the groups
3 4
Education level

43 44
Notice that the sample size in each group is small (n<30). Therefore, check
the normal distribution of the variable (attitudes score) for each group.

How to Analyse?

Levene’s test is not


significant. Therefore
assumption of equal
variances are met

ANOVA result is
significant

data is normally distributed for each group. Therefore


45 46
assumption of normal distribution is met.

1 If ANOVA is
significant, we
proceed to post
hoc multiple
comparisons test.

All possible pairs of means are significantly different.


With group of 3, there are 3
possible pairs for
comparison:
1 versus 2,
1 versus 3,
2 versus 3.

47
3 48
Results Presentation Results Presentation
Step 5: Interpret the results
Example:
Table 1.1
Ø The result from one-way ANOVA test revealed a
Mean differences on attitudes scores among three different level of education
groups significant association between level of education
and attitudes toward diabetes score (p < .001).
Further analysis using post-hoc Tukey test
suggested that all possible 3 pairs of mean
attitudes scores were significantly different.

49 50

Results Presentation
Step 6: Conclude the results

Ø There is a statistically significant association


between level of education and attitudes toward
diabetes among people with T2DM. We
observed that those with higher level of Pearson Correlation
education had higher attitudes scores than those
with lower level of education.

51 52
Pearson Correlation test Correlation – Scatter Plot
Ø  Use scatter plot for visual assessment of the linear relationship.
Ø  Relationship between two numerical variables
Ø  Correlation analysis is used to measure
Ø between two numerical variables (eg height and Linear relationships
weight)
Ø strength (value of r)
Ø direction of the relationship (-ve or +ve linear
relationship)
Ø  Only concerned with strength of the relationship
Non-linear/
Ø  No causal effect is implied, no prediction curvilinear
relationships

53 54

Correlation – Scatter Plot Characteristics of correlation : ρ and r


Ø  Unit free
Ø  Scale from +1 through 0 to -1
Ø  The closer to +1, the stronger the positive linear
No relationships relationship
Ø  The closer to -1, the stronger the negative linear
relationship
Ø  The closer to 0, the weaker the linear relationship

55 56
Examples of the Correlation Coefficient Examples of the Correlation Coefficient
Perfect positive Perfect negative
correlation, r ≈ 1 correlation, r ≈ -1
No relation, r ≈ 0 Some relation but little “linear”
relationship, r ≈ 0

Imperfect positive Imperfect negative


correlation, 0 < r <1 correlation, -1 < r < 0

57 58

Guideline in Interpreting, r Example


r = .00 – .25 : little or no correlation —  A researcher conducted a study to assess the
r = .26 - .50 : fair correlation relationship between height and weight
r = .51 - .75 : Moderate - good correlation among the students.
r = .76 to 1.00 : very - perfect correlation —  Research hypothesis:
Height and weight do linearly correlate
Note. For +ve or –ve values
among the students

(Ref: Colton, T. (1974). Statistics in medicine. Boston: Little Brown & Co.)

59 60
Step 1: State the hypotheses Step 2: Set the significance level
Null hypothesis: —  The significance level is set at 5% (α = 0.05, two tailed test).
There is no correlation between height and weight among the
students (ρ = 0)

Alternative hypothesis:
There is a correlation between height and weight among the
students (ρ ≠ 0)

61 62

Step 3: Checking the assumption Step 3: Checking the assumption


—  The appropriate test is correlation 1.  Random samples
—  Data is numerical
—  Independent observations
2.  Observations are Research method & design

—  Assumption for independent t test: independent


—  Random samples
1.  Linear relationship
—  Independent observations ?? (checked using
—  Linear relationship? 2.  Bivariate normal scatter plot,
“elliptical shape”)
—  Bivariate normal distribution?
distribution
—  If the assumption is not met, a comparable non parametric
test should be used (i.e., Spearman correlation).

63 64
Step 3: Checking the assumption
Step 4: Perform Statistical Test
2
2

1 3
1
It is linear and
3 reasonably bivariate
distribution.

Select “Pearson 6
correlation coefficient”

4
4

65
5 66 5

Step 5: Interpret the Results Step 5: Interpret the Results


Making decision based on the SPSS output:
Decide whether or not to reject the null hypothesis.
•  Compare the p-value with the level of significance set

—  We reject the null hypothesis since p-value < .001. Thus, we


Results: conclude on alternative hypothesis
—  Pearson correlation r = .639 , p-value < .001
—  There is a significant linear correlation between height and weight (p < .001) among the
students
—  The observed correlation coefficient, r is .64, which suggests positive linear relationship and
moderate to good correlation (Colton, 1974).

67 68
Step 6: Conclusion Presentation of Results (Table)
—  There is a statistically significant positive Example:
correlation (r = .64, p < .001) between height and Table 1.1
weight among the students. Descriptive Statistics and Correlations ofVariables

69 70

Вам также может понравиться