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

Polytechnic University of the Philippines

Engineering Data Analysis

Parametric Tests
Dependent Sample t-test
Dependent Sample Check Assumptions: Normality Check
Independent Sample
Dependent samples occur when you have two Independent samples occur when you have two
samples that do affect one another. samples that do not affect one another.

For example, the following studies use dependent For example, the following experiments use
samples: independent samples:
• A training program assessment takes pretest and • A medication trial has a control group and a
posttest scores from the same group of people. treatment group that contain different
• A paint durability study applies different types of subjects.
paint to portions of the same wooden boards. All • A study assesses the strength of a part made
paint types on the same board are considered from different alloys. Each alloy sample
paired. contains different parts.

Parametric Statistics
Engineering Data Analysis
Dependent Used to compare the means of two related groups to determine whether
Sample t-test there is a statistically significant difference between these means
Parametric Tests
One Sample t-test
Null Hypothesis (Ho) Alternative Hypothesis (Ha)
Dependent Sample t - test µ1 = µ2 µ1 ≠ µ2
Independent Sample t - test
One-way Analysis of Variance
µ1 ≤ µ2 µ1 > µ2
Pearson Product Moment Correlation µ1 ≥ µ2 µ1 < µ2
Assumptions
Dependent Variable: Interval or
Ratio Level Alternative
Command
Hypothesis (Ha)
Independent Variable: Consist
of two categorical, related
groups or matched pairs
µ1 ≠ µ2 t.test(a, b, alternative = “two.sided”, paired = TRUE, conf.level = 0.95)

No significant outliers in the µ1 > µ2 t.test(a, b, alternative = “greater”, paired = TRUE, conf.level = 0.95)
differences between the two
related group µ1 < µ2 t.test(a, b, alternative = “less”, paired = TRUE, conf.level = 0.95)
Difference should be
Approximately normally a and b are numeric vector of data values
distributed

Parametric Statistics
Engineering Data Analysis
Dependent
Sample t-test
Parametric Tests
One Sample t-test A teacher is interested to know it the Subject Score 1 Score 2
new learning program will help to
Dependent Sample t - test 1 24 26
increase the number of correct
Independent Sample t - test
remembered words. 10 Subjects learn 2 17 24
One-way Analysis of Variance a list of 50 words. Learning
3 32 31
Pearson Product Moment Correlation performance in measured using a
Assumptions 4 14 17
recall test. After the first test all
Dependent Variable: Interval or
Ratio Level subjects are instructed how to use 5 16 17
the learning program and then learn a
Independent Variable: Consist 6 22 25
of two categorical, related second list of 50 words. Learning
groups or matched pairs performance again measured with 7 26 25
No significant outliers in the recall test. In the following table are
differences between the two 8 19 24
the number of correct remembered
related group
words listed for both tests. 9 19 22
Difference should be
Approximately normally 10 22 23
distributed

Parametric Statistics
Engineering Data Analysis
Dependent
Check Assumptions: Normality
Sample t-test
Parametric Tests
One Sample t-test
Step 1: Subject Score 1 Score 2
1 24 26
Dependent Sample t - test Ho: The data is normally distributed
Independent Sample t - test Ha: The data is not normally distributed 2 17 24
One-way Analysis of Variance 3 32 31
Pearson Product Moment Correlation
Step 2
4 14 17
Assumptions set α = 0.05
Dependent Variable: Interval or 5 16 17
Ratio Level
Step 3 6 22 25
Independent Variable: Consist
of two categorical, related Use R to apply Shapiro Wilk test 7 26 25
groups or matched pairs
#Load the required data set in R
No significant outliers in the 8 19 24
differences between the two Subject <- c(1:10)
related group 9 19 22
Score1<-c(24,17,32,14,16,22,26,19,19,22)
Difference should be 10 22 23
Approximately normally Score2<-c(26,24,31,17,17,25,25,24,22,23)
distributed dt <-data.frame(Subject,Score1,Score2)
Parametric Statistics
Engineering Data Analysis
Dependent
Check Assumptions: Normality
Sample t-test
Parametric Tests
One Sample t-test
Step 4
Dependent Sample t - test #calculate the difference between score 1 and score 2
Independent Sample t - test dt <- dt %>% mutate(diff=(Score1-Score2))
One-way Analysis of Variance #apply Shapiro Wilk test
Pearson Product Moment Correlation
Assumptions
shapiro.test(dt$diff)
Dependent Variable: Interval or
Ratio Level Step 5
Independent Variable: Consist
of two categorical, related
Since the p-value is greater than α = 0.05, then we fail to reject the null
groups or matched pairs hypothesis
No significant outliers in the
differences between the two Step 6
related group

Difference should be
Therefore, the difference of the two related groups is normally
Approximately normally distributed
distributed

Parametric Statistics
Engineering Data Analysis
Dependent
Application
Sample t-test
Parametric Tests
One Sample t-test
Step 1:
Dependent Sample t - test Ho: µ1 ≥ µ2 Ha: µ1 < µ2
Independent Sample t - test
One-way Analysis of Variance Step 2
Pearson Product Moment Correlation
set α = 0.05
Assumptions
Dependent Variable: Interval or
Ratio Level
Step 3
Independent Variable: Consist Since we are comparing the means of two related groups,
of two categorical, related
groups or matched pairs we will use the dependent sample t –test
No significant outliers in the
differences between the two
Step 4
related group

Difference should be
t.test(dt$Score1, dt$Score2, alternative = “less”, paired = TRUE,
Approximately normally conf.level = 0.95)
distributed

Parametric Statistics
Engineering Data Analysis
Dependent
Application
Sample t-test
Parametric Tests
One Sample t-test Step 4
Dependent Sample t - test
Independent Sample t - test
One-way Analysis of Variance

Pearson Product Moment Correlation


Assumptions
Dependent Variable: Interval or
Ratio Level
Step 5
Independent Variable: Consist
of two categorical, related
groups or matched pairs
Since the p-value is less than α = 0.05, then we reject the null hypothesis
No significant outliers in the
differences between the two
Step 6
related group
There is sufficient evidence to conclude that the new learning program
Difference should be
Approximately normally will help increase the number of correct remembered words
distributed

Parametric Statistics
Engineering Data Analysis

You might also like