Polytechnic University of the Philippines
Engineering Data Analysis
Parametric Tests
One Sample t-test
Used to compare the mean of one sample to a know
One Sample t-test standard (theoretical or hypothetical) mean.
Parametric Tests
Null Hypothesis (Ho) Alternative Hypothesis (Ha)
One Sample t-test
µ = µ0 µ ≠ µ0
Dependent Sample t - test
Independent Sample t - test µ ≤ µ0 µ > µ0
One-way Analysis of µ ≥ µ0 µ < µ0
Variance
Pearson Product Moment Alternative
Correlation Command
Hypothesis (Ha)
Assumptions
µ ≠ µ0 t.test(x, mu = 0, alternative = “two.sided”, conf.level = 0.95)
Samples must be
independent t.test(x, mu = 0, alternative = “greater”, conf.level = 0.95)
µ > µ0
Approximately Normal t.test(x, mu = 0, alternative = “less”, conf.level = 0.95)
µ < µ0
x is a numeric vector of data values
Parametric Statistics
Engineering Data Analysis
One Sample t-test Example
Parametric Tests A psychologist makes use of a test instrument for measuring depression. The
One Sample t-test instrument is known to have a mean score of 70 for normal individuals. Twenty
individuals who have been described as severely depressed by a therapist takes the
Dependent Sample t - test
tests. A psychologist is interested to know if the average test score made by severely
Independent Sample t - test depressed individuals is greater than 70. The data are reflected on the table below.
One-way Analysis of No Score No Score
Variance 1 75 11 75
Pearson Product Moment 2 77 12 74
Correlation 3 73 13 63
Assumptions
4 80 14 76
Samples must be
5 65 15 67
independent
6 74 16 70
Approximately Normal
7 75 17 69
8 69 18 76
9 71 19 65
Parametric Statistics 10 72 20 68
Engineering Data Analysis
One Sample t-test Check Assumptions: Normality Check
Parametric Tests
Step 1:
One Sample t-test
Ho: The data is normally distributed
Dependent Sample t - test
Ha: The data is not normally distributed
Independent Sample t - test
Step 2
One-way Analysis of
Variance set α = 0.05
Pearson Product Moment
Correlation Step 3
Assumptions Use R to apply Shapiro Wilk test
Samples must be #Load the required data set in R
independent
shapiro.test(scores$Score)
Approximately Normal
Parametric Statistics
Engineering Data Analysis
One Sample t-test Check Assumptions: Normality Check
Parametric Tests
Step 4
One Sample t-test
Dependent Sample t - test
Independent Sample t - test
One-way Analysis of
Variance Step 5
Pearson Product Moment Since the p-value is greater than α = 0.05, then we fail to reject
Correlation
the null hypothesis
Assumptions
Samples must be Step 6
independent
Since the p-value is greater than α = 0.05, then we fail to reject
Approximately Normal
the null hypothesis. Therefore, the sample data is normally
distributed.
Parametric Statistics
Engineering Data Analysis
One Sample t-test Application
Parametric Tests
Step 1:
One Sample t-test
Ho: µ ≤ 70
Dependent Sample t - test
Ha: µ > 70
Independent Sample t - test
Step 2
One-way Analysis of
Variance set α = 0.05
Pearson Product Moment
Correlation Step 3
Assumptions Since we are comparing the mean of one sample to a known
Samples must be standard mean, we will use the one sample t - test
independent
Approximately Normal
Step 4
t.test(scores$Score, mu = 70, alternative = "greater", conf.level = 0.95)
Parametric Statistics
Engineering Data Analysis
One Sample t-test Check Assumptions: Normality Check
Parametric Tests
Step 4
One Sample t-test
Dependent Sample t - test
Independent Sample t - test
One-way Analysis of
Variance
Pearson Product Moment Step 5
Correlation
Assumptions
Since the p-value is greater than α = 0.05, then we fail to reject
Samples must be
the null hypothesis
independent
Step 6
Approximately Normal
There is no sufficient evidence to conclude that the average score
made by severely depressed individual is greater than 70
Parametric Statistics
Engineering Data Analysis