You are on page 1of 33

2023

MANN WHITNEY U TEST


• Used to compare differences between two independent
groups when the dependent variable is either ordinal or
continuous, but not normally distributed.
• sometimes called the Mann Whitney Wilcoxon Test or
the Wilcoxon Rank Sum Test.
• Often considered the nonparametric alternative to the
independent t-test (although this is not always the case).

P
G
SU 02
N
EXAMPLE
• A CI gave an exam to 12 students, 6 were
male and 6 were female. She recorded the
-C
scores and tabulated it in the table below:
M 2

Male 80 79 92 65 83 84
Female 82 87 89 91 93 76
W FN

STEP BY STEP GUIDE


Step 1: State the null and alternate hypothesis and rejection
criteria
H0: μm = μf There is no difference in the ranks of the two pairs of
observations (The median difference between the pairs ranks of
the observations is zero)
HA: μm ≠ μf There is a difference in the ranks of the two pairs of
observations (The median difference between the ranks of data is
not zero)
Rejection Criteria: Reject the null hypothesis if Ustat < Ucrit
2023

Step 2: Perform a ranking Score Rank


65 1
of all the observation
76 2
79 3
80 4
82 5
83 6
84 7
87 8
89 9
91 10
92 11
93 12

P
G
SU 02
N
STEP BY STEP GUIDE
Step 2: Perform a ranking of all the observation
Male Rank Female Rank
-C
80 4 82 5
M 2

79 3 87 8
92 11 89 9
65 1 91 10
W FN

83 6 93 12
84 7 76 2

STEP BY STEP GUIDE


Step 3: Calculate the Rank Sums

Sum for Male (n1) = 1+3+4+6+7+11


= 32

Sum for Female (n2) = 2+5+8+9+10+12


= 46
2023

MANN WHITNEY U TEST


• Step 4: Calculate the U Statistic for the Two Groups

• Formula:
= − = −

U = Mann-Whitney U test
N1 = Sample size one
N2 = Sample size two
R1 = Sum of the ranks for group 1
R2 = Sum of the ranks for group 2

P
G
SU 02
N
STEP BY STEP GUIDE
Step 4: Calculate the U Statistic for the Two Groups
= − = + −
-C
M 2

= + − = + −

( )
= + − = −
W FN

= + − =

STEP BY STEP GUIDE


Step 4: Calculate the U Statistic for the Two Groups
= − = + −

= + − = + −

( )
= + − = −

= + − =
2023

STEP BY STEP GUIDE


Step 4: Calculate the U Statistic for the Two Groups

= =

• The U-stat is the smaller value of the two and that would be:

Ustat = 11

P
G
SU 02
N
STEP BY STEP GUIDE
Step 5: Determine the Critical value from Table

• From Mann-Withney u-test table, check the value under column 6 and row
-C
6. The critical value of U to be: Ucrit = 5
M 2

• Since the calculated value of U (Ustat = 11) is greater than the critical value
(Ucrit = 5), we do not reject the null hypothesis and agree that the two groups
are the same.
W FN

• Since Ustat = 11 at . > Ucrit = 5, Do not reject null hypothesis. We do not


have sufficient evidence to conclude that there is a difference in the ranks of
the two pairs of observations

EXAMPLE
• A CI gave an exam to 12 students, 6 were
male and 6 were female. She recorded the
scores and tabulated it in the table below:

Male 80 79 92 65 89 84
Female 82 87 89 91 93 76
2023

Step 2: Perform a ranking Score Rank


of all the observation 65 1
76 2
79 3
80 4
82 5
84 6
87 7
89 8
89 9
91 10
92 11
93 12

P
G
SU 02
N
STEP BY STEP GUIDE
Step 2: Perform a ranking of all the observation
Male Rank Female Rank
= 8.5
-C
80 4 82 5
M 2

79 3 87 7
92 11 89 8.5
65 1 91 10
W FN

89 8.5 93 12
84 6 76 2

STEP BY STEP GUIDE


Step 3: Calculate the Rank Sums

Sum for Male (n1) = 1+3+4+6+8.5+11


= 33.5

Sum for Female (n2) = 2+5+7+8.5+10+12


= 44.5
2023

STEP BY STEP GUIDE


Step 4: Calculate the U Statistic for the Two Groups
= − = + − .

= + − . = + − .

( )
= + − . = − .

= + − . = .

P
G
SU 02
N
STEP BY STEP GUIDE
Step 4: Calculate the U Statistic for the Two Groups
= − = + − .
-C
M 2

= + − . = + − .

( )
= + − . = − .
W FN

= + − . = .

STEP BY STEP GUIDE


Step 4: Calculate the U Statistic for the Two Groups

= . = .

• The U-stat is the smaller value of the two and that would be:

Ustat = 12.5
2023

STEP BY STEP GUIDE


Step 5: Determine the Critical value from Table

• From Mann-Withney u-test table, check the value under column 6 and row
6. The critical value of U to be: Ucrit = 5

• Since the calculated value of U (Ustat = 12.5) is greater than the critical
value (Ucrit = 5), we do not reject the null hypothesis and agree that the two
groups are the same.

• Since Ustat = 12.5 at . > Ucrit = 5, Do not reject null hypothesis. We do


not have sufficient evidence to conclude that there is a difference in the ranks
of the two pairs of observations

P
G
SU 02
N
WILCOXON SIGN TEST
• A non-parametric statistical hypothesis test that does not
assume normal distribution (Haynes, 2013).
• Used to compare two related samples, matched
-C
M 2

samples, or to conduct a paired difference test of


repeated measurements on a single sample to assess
whether their population mean ranks differ.
• The non-parametric of the t-test for dependent
W FN

samples.

EXAMPLE
• A researcher is testing whether the memory performance
of 6 participants is better in the morning or evening.
M e mory Pe rformance i n M e mory Pe rformance i n
th e Morn i ng th e Eve n i ng
34 45
36 33
41 35
39 43
44 42
37 32
2023

STEP BY STEP GUIDE


Step 1: State the null and alternate hypothesis and
reject criteria
H0 (Null): There is no difference in the memory
performance of the participants between in the morning
and in the evening.

HA (Alternative): There is no difference in the memory


performance of the participants between in the morning
and in the evening.

P
G
SU 02
N
STEP BY STEP GUIDE
Step 1: State the null and alternate hypothesis and
reject criteria
-C
Reject Criteria:
M 2

If Wobs ≤ Wcri, Reject H0, Accept HA


If Wobs ≥ Wcri, Reject HA, Accept H0 (Fail to reject null
hypothesis)
W FN

STEP BY STEP GUIDE


Step 2: Calculate the difference between paired measurements
and rank them
Memory Performance Memory Performance
Difference Rank
in the Morning in the Evening
34 45 -11 6 (-)

36 33 3 2

41 35 6 5

39 43 -4 3 (-)

44 42 2 1

37 32 5 4
2023

STEP BY STEP GUIDE


Step 3: Calculate the sum of the ranks to find test statistic

Sum of ranks for positive Test Statistic: W= min (T+, T-)


differences W = min (12, 9) = 9
W+ = 2 + 5 + 1 + 4 = 12
The Wilcoxon signed rank
Sum of ranks for negative test statistics is taken as the
differences lowest of two sums of the
W- = 6 + 3 = 9 ranks. W = 9

P
G
SU 02
N
STEP BY STEP GUIDE
Step 3: Calculate the sum of the ranks to find test statistic

Check in the assignments of ranks:


-C
M 2

( )

9 + 12 = 21
W FN

STEP BY STEP GUIDE


Step 4: Determine whether the Wobs and Wcri and interpret
n=6 @ .05 (two-tailed)
Wobs = 9
Wcri = 0

Since @ .05 level of significance


Wobs=9 ≥ Wcri=0,
Reject HA, Accept H0
(Fail to reject null hypothesis)
2023

HOW ABOUT WITH TIED


RANKS?

P
G
SU 02
N
EXAMPLE
• A researcher is testing whether the memory performance
of 6 participants is better in the morning or evening.
M e mory Pe rformance i n M e mory Pe rformance i n
-C
th e Morn i ng th e Eve n i ng
M 2

34 36
36 34
41 35
39 43
W FN

44 42
37 32

STEP BY STEP GUIDE


Step 1: State the null and alternate hypothesis and
reject criteria
H0 (Null): There is no difference in the memory
performance of the participants between in the morning
and in the evening.

HA (Alternative): There is no difference in the memory


performance of the participants between in the morning
and in the evening.
2023

STEP BY STEP GUIDE


Step 1: State the null and alternate hypothesis and
reject criteria
Reject Criteria:
If Wobs ≤ Wcri, Reject H0, Accept HA
If Wobs ≥ Wcri, Reject HA, Accept H0 (Fail to reject null
hypothesis)

P
G
SU 02
N
STEP BY STEP GUIDE
Step 2: Calculate the difference between paired measurements
and rank them
Memory Performance in Memory Performance in
Difference Rank
the Morning the Evening
-C
34 36 -2 2(-)
M 2

36 34 2 2
+ +
41 35 6 6

39 43 -4 4(-)
W FN

=2
44 42 2 2

37 32 5 5

STEP BY STEP GUIDE


Step 3: Calculate the sum of the ranks to find test statistic

Sum of ranks for negative Test Statistic: W= min (T+, T-)


differences W = min (15, 6) = 6
W- = 2 + 4 = 6
The Wilcoxon signed rank
Sum of ranks for positive test statistics is taken as the
differences lowest of two sums of the
W+ = 2 + 6 + 2 + 5 = 15 ranks. W = 6
2023

STEP BY STEP GUIDE


Step 3: Calculate the sum of the ranks to find test statistic

Check in the assignments of ranks:

( )

6 + 15 = 21

P
G
SU 02
N
STEP BY STEP GUIDE
Step 4: Determine whether the Wobs and Wcri and interpret
n=6 @ .05 (two-tailed)
Wobs = 6
-C
Wcri = 0
M 2

Since @ .05 level of significance


Wobs=9 ≥ Wcri=0,
W FN

Reject HA, Accept H0


(Fail to reject null hypothesis)

SPEARMAN’s RANK CORRELATION


• A nonparametric measure of rank correlation (statistical
dependence of ranking between two variables).
• Measures the strength and direction of association
between two ranked variables.
• Basically gives the measure of monotonicity of the relation
between two variables i.e. how well the relationship
between two variables could be represented using a
monotonic function.
2023

SPEARMAN’s RANK CORRELATION


Formula: The Spearman Rank Correlation
rs = 1 - can take a value from +1 to -1
( ) where,
=1- • A value of +1 means a perfect
( )
Where: association of rank
rs = Spearman’s rank • A value of 0 means that there
correlation coefficient is no association between
di = Difference between the
two ranks of each
ranks
observation • A value of -1 means a perfect
n = Number of observations negative association of rank

P
G
SU 02
N
EXAMPLE
The scores for nine graduate students in FN201 and FN202
are as follows:
FN201 35 23 47 17 10 43 9 6 28
-C
M 2

FN202 30 33 45 23 8 49 12 4 31
Compute the student’s ranks in the two subjects and
compute the Spearman rank correlation.
W FN

STEP BY STEP GUIDE


Step 1: Create a table for the given data.
FN201 FN202
35 30
23 33
47 45
17 23
10 8
43 49
9 12
6 4
28 31
2023

STEP BY STEP GUIDE


Step 2: Start by ranking the two data sets.
Data ranking can be achieved by assigning the
ranking “1” to the biggest number in the column, “2”
to the second biggest number and so forth.
The smallest value will usually get the lowest
ranking. This should be done for both sets of
measurements.

P
G
SU 02
N
STEP BY STEP GUIDE
Step 2
FN201 RANK FN202 RANK
-C
35 3 30 5
M 2

23 5 33 3
47 1 45 2
17 6 23 6
10 7 8 8
43 2 49 1
W FN

9 8 12 7
6 9 4 9
28 4 31 4

STEP BY STEP GUIDE


Step 3: Calculate the difference between the ranks (d)
and the square value of d.
FN201 RANK FN202 RANK d d2
35 3 30 5 -2 4
23 5 33 3 2 4
47 1 45 2 -1 1
17 6 23 6 0 0
10 7 8 8 -1 1
43 2 49 1 1 1
9 8 12 7 1 1
6 9 4 9 0 0
28 4 31 4 0 0
2023

STEP BY STEP GUIDE


Step 4: Add all your d square values.
FN201 RANK FN202 RANK d d2
35 3 30 5 -2 4
23 5 33 3 2 4
47 1 45 2 -1 1
17 6 23 6 0 0
10 7 8 8 -1 1
43 2 49 1 1 1
9 8 12 7 1 1
6 9 4 9 0 0
28 4 31 4 0 0
d2 = 12

P
G
SU 02
N
STEP BY STEP GUIDE
Step 5: Insert these values into the formula.

=1- =1-
( )
-C
M 2

( )
=1- = 1 - 0.
( )
W FN

=1- = 0.
( )

STEP BY STEP GUIDE


Step 6: Insert these values into the formula.
The Spearman’s Rank Correlation is 0.9
Recall: if the ⍴ value is nearing +1 then they have a perfect
association of rank.
• Conclusion: This indicates a strong positive relationship
between the ranks graduate students obtained in the
FN201 and FN202 scores. That is, the higher the
graduate student ranked in FN201, the higher the
graduate student ranked in FN202 also, and vice versa.
2023

HOW ABOUT WITH TIED


RANKS?

P
G
SU 02
N
SPEARMAN CORRELATION WITH TIED RANKS
Formula:

=1–6
( )
-C
M 2

Where , …are the number of repetitions of ranks and


is their corresponding correction factors.
W FN

EXAMPLE
The scores for nine graduate students in FN201 and FN202
are as follows:
FN201 35 23 47 17 10 43 9 6 28
FN202 30 33 45 30 8 49 12 4 31
Compute the student’s ranks in the two subjects and
compute the Spearman rank correlation.
2023

STEP BY STEP GUIDE


Step 1: Create a table for the given data.
FN201 FN202
35 30
23 33
47 45
17 30
10 8
43 49
9 12
6 4
28 31

P
G
SU 02
N
STEP BY STEP GUIDE
Step 2: Start by ranking the two data sets.
Data ranking can be achieved by assigning the
-C
ranking “1” to the biggest number in the column, “2”
M 2

to the second biggest number and so forth.


The smallest value will usually get the lowest
ranking. This should be done for both sets of
measurements.
W FN

STEP BY STEP GUIDE


Step 2
FN201 RANK FN202 RANK +
35 3 30 5.5 (5) = = .
23 5 33 3
47 1 45 2
17 6 30 5.5 (6)
10 7 8 8
43 2 49 1
9 8 12 7
6 9 4 9
28 4 31 4
2023

STEP BY STEP GUIDE


Step 3: Calculate the difference between the ranks (d)
and the square value of d.
FN201 RANK FN202 RANK d d2
35 3 30 5.5 -2.5 6.25
23 5 33 3 2 4
47 1 45 2 -1 1
17 6 30 5.5 0.5 0.25
10 7 8 8 -1 1
43 2 49 1 1 1
9 8 12 7 1 1
6 9 4 9 0 0
28 4 31 4 0 0

P
G
SU 02
N
STEP BY STEP GUIDE
Step 4: Add all your d square values.
FN201 RANK FN202 RANK d d2
35 3 30 5.5 -2.5 6.25
-C
23 5 33 3 2 4
M 2

47 1 45 2 -1 1
17 6 23 5.5 0.5 0.25
10 7 8 8 -1 1
43 2 49 1 1 1
9 8 12 7 1 1
W FN

6 9 4 9 0 0
28 4 31 4 0 0
d2 = 14.5

Where m1,m2…. are the number of repetitions of ranks and m –m 12


3i i is their corresponding correction factors.

STEP BY STEP GUIDE


Step 5: Insert these values into the formula.

=1- =1-
( )

( . )
=1- = 1 - 0.
( )

=1- = 0.
( )
2023

STEP BY STEP GUIDE


Step 6: Insert these values into the formula.
The Spearman’s Rank Correlation is 0.88
Recall: if the ⍴ value is nearing +1 then they have a perfect
association of rank.
• Conclusion: This indicates a strong positive relationship
between the ranks graduate students obtained in the
FN201 and FN202 scores. That is, the higher the
graduate student ranked in FN201, the higher the
graduate student ranked in FN202 also, and vice versa.

P
G
SU 02
N
INDEPENDENT T-TEST
• Compares the means of two independent groups in order
to determine whether there is statistical evidence that the
associated population means are significantly different
-C
M 2

• A parametric test.
• This test is also known as: Independent t Test,
Independent Two-sample t Test, Two-Sample t Test,
Unpaired t Test
W FN

INDEPENDENT T-TEST
Formula:

=
+
+
+ −

( )
= ∑ −
Where:
t = Independent t-test
X1 = Mean score of Group 1
X2 = Mean score of Group 2
SS = Sum of Squares
2023

EXAMPLE
• A researcher is testing whether there is a difference in the
memory performance of Group 1 and Group 2
G rou p 1 G rou p 2
6 4
9 6
8 3
9 4
8 7

P
G
SU 02
N
STEP BY STEP GUIDE
Step 1: State the null and alternate hypothesis and
reject criteria
-C
H0 (Null): There is no difference in the memory
M 2

performance of Group 1 and Group 2


HA (Alternative): There is a difference in the memory
performance of Group 1 and Group 2
W FN

STEP BY STEP GUIDE


Step 1: State the null and alternate hypothesis and
reject criteria
Reject Criteria:
Reject Criteria:
If tobs ≤ tcri, Reject HA, Accept H0 (Fail to reject null
hypothesis)
If tobs ≥ tcri, Reject H0, Accept HA
2023

STEP BY STEP GUIDE


Step 2: Calculate the mean and the summation x2 of each
group
Group 1 Group 2
6 36 4 16
9 81 6 36
8 64 3 9
9 81 4 16
8 64 7 49

= x̄1 = 8 = = x̄2 = 4.8 =

P
G
SU 02
N
STEP BY STEP GUIDE
Step 3: Compute for the Sum of Squares (SS)
( ) ( )
= − = −
-C
( ) ( )
M 2

= − = −

= − = −
W FN

= − = − .
= = .

STEP BY STEP GUIDE


Step 3: Calculate for independent t-test
− .
= =
+
+ ( . )( . )
+ −

− . .
= =
+ .
+
.
+ −
.
. =
= .
.
. + .
= .
2023

STEP BY STEP GUIDE


Step 4: Determine whether the tobs and tcri and interpret
n=5 @ .05 (two-tailed)
df = n-1 = 5-1 = 4
tobs = 3.84
tcri = 2.776

Since
tobs=3.84 ≥ tcri=2.776
Reject HA, Accept H0
(Fail to reject null hypothesis)

P
G
SU 02
N
DEPENDENT T-TEST
• Conducted when the observations of one sample group is
known to be related in some way to the other
observations of sample group.
-C
M 2

• Compares the means of those two related sample groups.


• Also known as: Dependent Samples t-test, Matched-
Pairs t-test, t-test for Dependent Means
W FN

DEPENDENT T-TEST
Formula:

=
−( )

Where:
t = Dependent t-test
= Total of d
= Total of d2
N = Sample
2023

EXAMPLE
The scores for nine graduate students in FN201 and FN202
are as follows:
FN201 35 23 47 17 10 43 9 6 28
FN202 30 33 45 23 8 49 12 4 31

P
G
SU 02
N
STEP BY STEP GUIDE
Step 1: State the null and alternate hypothesis and
reject criteria
-C
H0 (Null): There is no difference between the scores of
M 2

graduate students obtained in the FN201 and FN202.

HA (Alternative): There is a difference between the


scores of graduate students obtained in the FN201 and
W FN

FN202.

STEP BY STEP GUIDE


Step 1: State the null and alternate hypothesis and
reject criteria
Reject Criteria:
If tobs ≤ tcri, Reject HA, Accept H0 (Fail to reject null
hypothesis)
If tobs ≥ tcri, Reject H0, Accept HA
2023

STEP BY STEP GUIDE


Step 2: Calculate the difference (d) of the variables and
compute for square of d (d2)
FN201 FN202 d d2
35 30 5 25
23 33 -10 100
47 45 2 4
17 23 -6 36
10 8 2 4
43 49 -6 36
9 12 -3 9
6 4 2 4
28 31 -3 9

P
G
SU 02
N
STEP BY STEP GUIDE
Step 3: Get the summation of d and d2
FN201 FN202 d d2
35 30 5 25
23 33 -10 100
-C
47 45 2 4
M 2

17 23 -6 36
10 8 2 4
43 49 -6 36
9 12 -3 9
W FN

6 4 2 4
28 31 -3 9
= -17 = 227

STEP BY STEP GUIDE


Step 4: Calculate for dependent t-test

= =
−( )


= −
( )( ) − (− ) =
− .

− −
= =
− .

= .
2023

STEP BY STEP GUIDE


Step 5: Determine whether the tobs and tcri and interpret
n=9 @ .05 (two-tailed)
df = n-1 = 9-1 = 8
tobs = 1.48
tcri = 2.306

Since tobs ≤ tcri,


Reject HA, Accept H0
(Fail to reject null hypothesis)

P
G
SU 02
N
PEARSON CORRELATION COEFFICIENT
• Most widely used correlation coefficient and is known by
many names:
o Pearson’s r
-C
M 2

o Bivariate correlation
o Pearson product-moment correlation coefficient (PPMCC)
o The correlation coefficient
• Measures the linear association between two variables.
W FN

• Most common way of measuring a linear correlation.

PEARSON CORRELATION COEFFICIENT


Pearson correlation
Correlation type Interpretation Example
coefficient (r)
When one variable Baby length & weight:
changes, the other
Between 0 and 1 Positive correlation
variable changes in the The longer the baby, the
same direction. heavier their weight.
Car price & width of
windshield wipers:
There is no relationship
0 No correlation
between the variables. The price of a car is not
related to the width of its
windshield wipers.
Elevation & air pressure:
When one variable
Between changes, the other
Negative correlation The higher the elevation,
0 and –1 variable changes in the
the lower the air
opposite direction.
pressure.
2023

PEARSON CORRELATION COEFFICIENT


• Although interpretations of the relationship strength (also known
as effect size) vary between disciplines, the table below gives
general rules of thumb:
Pearson correlation
Strength Direction
coefficient (r) value
Greater than .5 Strong Positive
Between .3 and .5 Moderate Positive
Between 0 and .3 Weak Positive
0 None None
Between 0 and –.3 Weak Negative
Between –.3 and –.5 Moderate Negative
Less than –.5 Strong Negative

P
G
SU 02
N
CALCULATING THE PEARSON CORRELATION
COEFFICIENT
• FORMULA:

( )
r =
-C
][ ( )]
M 2

• r = Pearson Coefficient
• n= number of pairs of the stock
• ∑xy = sum of products of the paired stocks
• ∑x = sum of the x scores
W FN

• ∑y= sum of the y scores


• ∑x2 = sum of the squared x scores
• ∑y2 = sum of the squared y scores

EXAMPLE
Study the relationship between newborns’ weight and length of the
10 born last month at a local hospital.
Weight (kg) Length (cm)
3.63 53.1
3.02 49.7
3.82 48.4
3.42 54.2
3.59 54.9
2.87 43.7
3.03 47.2
3.46 45.2
3.36 54.4
3.3 50.4
2023

STEP BY STEP GUIDE


Step 1: Calculate the sums of x and y
Weight (kg) (X) Length (cm) (Y)
3.63 53.1
3.02 49.7
3.82 48.4
3.42 54.2
3.59 54.9
2.87 43.7
3.03 47.2
3.46 45.2
3.36 54.4
3.3 50.4
33.5 501.2

P
G
SU 02
N
STEP BY STEP GUIDE
Step 2: Calculate x2 and y2 and their sums
Weight (kg) (x) Length (cm) (y) x2 y2
3.63 53.1 3.63 819.6
3.02 49.7 9.12 2,470.1
-C
M 2

3.82 48.4 14.59 2,342.6


3.42 54.2 11.7 2,937.6
3.59 54.9 12.89 3,014
2.87 43.7 8.24 1,909.7
3.03 47.2 9.18 2,227.8
3.46 45.2 11.97 2,043
W FN

3.36 54.4 11.29 2,959.4


3.3 50.4 10.89 2,540.2
33.5 501.2 113.05 25,264

STEP BY STEP GUIDE


Step 3: Calculate the cross product and its sum
Weight (kg) (x) Length (cm) (y) x2 y2 xy (x*y)
3.63 53.1 3.63 819.6 192.8
3.02 49.7 9.12 2,470.1 150.1
3.82 48.4 14.59 2,342.6 184.9
3.42 54.2 11.7 2,937.6 185.4
3.59 54.9 12.89 3,014 197.1
2.87 43.7 8.24 1,909.7 125.4
3.03 47.2 9.18 2,227.8 143
3.46 45.2 11.97 2,043 156.4
3.36 54.4 11.29 2,959.4 182.8
3.3 50.4 10.89 2,540.2 166.3
33.5 501.2 113.05 25,264 1,684.2
2023

STEP BY STEP GUIDE


( )
Step 3: Calculate r r =
][ ( )]
n = 10
( ) , . . ( . )
= 33.5 r =
[ . . ][ , ( . )]
= 501.2 , , .
r =
= 113.05 [ . , . ][ , , . ]

= 25,264 . .
r = r =
= 1,684.2 [ , . .

r = .
Since r = . , there is a moderate positive relationship between the length and weight of the
newborn baby. The longer the baby, the heavier their weight.

P
G
SU 02
N
ANALYSIS OF VARIANCE
• A one-way ANOVA compares the means of three or more
independent groups to determine if there is a statistically
significant difference between the corresponding
-C
population means.
M 2
W FN

CALCULATING THE PEARSON CORRELATION


COEFFICIENT
• FORMULA:

( )
r =
][ ( )]

• r = Pearson Coefficient
• n= number of pairs of the stock
• ∑xy = sum of products of the paired stocks
• ∑x = sum of the x scores
• ∑y= sum of the y scores
• ∑x2 = sum of the squared x scores
• ∑y2 = sum of the squared y scores
2023

EXAMPLE
Using the following three groups of data, perform a one-way
analysis of variance using α = 0.05.
Group 1 Group 2 Group 3
51 23 56
45 43 76
33 23 74
45 43 87
67 45 56

P
G
SU 02
N
STEP BY STEP GUIDE
Step 1: Calculate all the means
Group 1 Group 2 Group 3
51 2,601 23 529 56 3,136
-C
45 2,025 43 1,849 76 5,776
M 2

33 1,089 23 529 74 5,476


45 2,025 43 1,849 87 7,569
67 4,489 45 2,025 56 3,136
x = 241 x2 = 12,229 x = 177 x2 = 6,781 x = 349 x2 = 25,093
W FN

= 48.2 = 35.4 = 69.8

STEP BY STEP GUIDE


Step 1: Calculate all the means
All Groups
51 56
45 76
33 74
45 87
67 56
23 X = 767
43
23 = 51.13
43
45
2023

STEP BY STEP GUIDE


Step 2: Set up the Null and Alternate Hypothesis
The null hypothesis assumes that there is no variance data in different groups.
In other words, the means are the same
The alternate hypothesis states the means are different.
H0: μ1 = μ2 = μ3 There is no significant difference between the means of
Groups 1, 2 and 3
HA: μ1 ≠ μ2 ≠ μ3 There is a significant difference between the means of
Groups 1, 2 and 3

Rejection Criteria:
α = 0.05
Reject the null hypothesis if Fcrit < Fobs (K0.05 < F)
If the critical value of F from tables is less than the calculated value of F, we
reject the null hypothesis

P
G
SU 02
N
STEP BY STEP GUIDE
Step 3: Calculate the Sum of Squares
Sum of Squares Within Groups (SSw): The sum of squares within
each group.
-C
2 2 2 2 2 2
∑ X1 ∑ X2 ∑ X3
M 2

SSw = X − + X − + X −
n1 n2 n3
1 2 3
( )
SSw = 12,229− + 6,781− + 25,093−
5 5 5
58,081 31,329 121,801
SSw = 12,229− + 6,781− + 25,093−
W FN

5 5 5
SSw = 12,229−11,616.2 + 6,781−6,265.8 + 25,093−24,360.2
SSw = 612.8+515.2+732.8
SSw = 1,860.80

STEP BY STEP GUIDE


Step 3: Calculate the Sum of Squares
Sum of Squares Between Groups (SSb): This is the sum of squares with the groups
taken as single elements.
∑ ) ∑ ) ∑ ) ∑ )
= + + −

) ) ) )
= + + −
, , , ,
= + + −
= , . + , . + , . − , .
= , . − , .
= , .
2023

STEP BY STEP GUIDE


Step 3: Calculate the Sum of Squares
Sum of Squares Total (SST): Sum of Squares(SS) based on the
entire set in all the groups.

= +
= , . + , .
= , .

P
G
SU 02
N
STEP BY STEP GUIDE
Step 4: Calculate the Degrees of Freedom
The degrees of freedom are calculated using the formula
below.
-C
M 2

dftotal= n – 1 = 15 – 1 = 14
dfb = k – 1 = 3 – 1 = 2 (numerator)
dfw = n – k = 15 – 3 = 12 (denominator)
W FN

Verify that dftotal = dfb + dfw

STEP BY STEP GUIDE


Step 5: Calculate the Mean Squares
The formula is given below for the mean squares between
=
dfb

, .
=

= , .
2023

STEP BY STEP GUIDE


Step 5: Calculate the Mean Squares
The formula for the mean squares within
=

, .
=

= .

P
G
SU 02
N
STEP BY STEP GUIDE
Step 6: Calculate the F Statistic
• Then we go ahead to calculate the F statistic using MSB and
MSW
-C
MSb
M 2

F=
MSw

1,511.47
F=
155.07
W FN

F=9.75

STEP BY STEP GUIDE


Step 7: Look up F from table and state your Conclusion
2023

STEP BY STEP GUIDE


Step 7: Look up F from table and state your Conclusion
• From the table of F distribution, the critical value of F for
0.05 significance and degrees of freedom of (df1 = 2 and
df2 = 12) we have F = 3.89
• Since @.05 Fobs = 9.75 > Fcri = 3.89, there is a significant
difference between the means of groups 1, 2 and 3.

P
G
SU 02
N
-C
M 2
W FN

You might also like