Paired T Test Calculations

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 11

7.

2
use paire t-test to test if there are different in students' performance in math compared to english

student 1 2 3 4 5 6 7
Math 83 72 91 62 80 43 59
English 54 92 64 88 59 76 62
different 29 -20 27 -26 21 -33 -3

H0: mu=0 (mu= mu1-mu2)


H1: mu <> 0

sample mean 2.5


sample sd 29.0067
TS 0.272547
CV 2.262157
conclusion ts<CV fail to reject

ex 7.3
use sign test for prob in ex 7.2

student 1 2 3 4 5 6 7
Math 83 72 91 62 80 43 59
English 54 92 64 88 59 76 62
different 29 -20 27 -26 21 -33 -3
sign 1 0 1 0 1 0 0

x 5 = 5 positive different
test statistic 0
cv 1.959964
conclusion Ts< CV fail to reject
8 9 10
36 82 75
71 42 50
-35 40 25

8 9 10
36 82 75
71 42 50
-35 40 25
0 1 1
PAIRED T TEST Ho MEAN DIFFERENCE μ(D) = 0
Ha MEAN DIFFERENCE μ(D)≠0
2 SIDED ALTERNATIVE

PATIENT BEFORE DRUG AFTER DRUG DIFFERENCE = BEFORE - AFTER


1 7.2 6.4 0.8 1.2200
2 6.7 5.4 1.3 0.9211
3 9 8.2 0.800000000000001 10
4 8.2 8.2 0
5 7.6 6.5 1.1 9
6 9.8 7.4 2.4 0.291280697
7 6.8 5 1.8 4.18839975518
8 7.1 4.9 2.2 5%
9 7.9 8.2 -0.299999999999999 2.2622
10 8.3 6.2 2.1 YES
0.2347%
YES
SAMPLE MEAN DIFFERENCE
SAMPLE STD DEVIATION
N=SAMPLE SIZE
POPULATION SD UNKOWN SO USE SAMPLE SD
DF = DEGREES OF FREEDOM FOR T TEST
SE=STANDARD ERROR OF SAMPLE MEAN
TS = TEST STATISTIC
SIGNIFICANCE LEVEL ALPHA (2 SIDED)
CRITICAL VALUE CV
REJECT Ho BASED ON CV?
PVALUE
REJECT Ho BASED ON PVALUE?
DIFF =
MONDAY
WORKER MONDAY FRIDAY - FRIDAY
1 273 243 30 10
2 221 225 -4 yes
3 186 188 -2 7.500
4 271 270 1 12.058
5 234 219 15 3.813
6 253 233 20 1.967
7 281 271 10 5%
8 183 178 5 9
9 177 187 -10 2.262157
10 200 190 10 no
8.07%
no
NULL HYPOTHESIS: NO DIFFERENCE BETWEEN NULL HYPOTHESIS: NO DIFFERENCE BETWEEN
PRODUCTIVITY ON THE 2 DAYS PRODUCTIVITY ON THE 2 DAYS
ALTERNATIVE HYPOTHESIS: THERE IS A
DIFFERENCE BETWEEN PRODUCTIVITY ON THE 2 ALTERNATIVE HYPOTHESIS: THERE IS A
DAYS DIFFERENCE D>0
Ho: μ(D)=0 Ho: μ(D)=0
Ha: μ(D)≠0 Ha: μ(D)>0

sample size
population sd unknown?
sample mean of differences
sample std deviation of differences
std error of sample mean
TS = test statistic TS
level of significance for test
degrees of freedom
CV = critical value for 2 sided test 1.833113 CV = critical value for 1 sided test
reject based on CV?
Pvalue for 2 sided test 4.0368% Pvalue for 1 sided test
reject based on Pvalue?
ex
7.9

shade sun
sample 20 30
sample mean 58 64.5

heights are normally distributed with standard deviation of 12 cm

test if position of plantig affect heights at alpha = 0.05

what test? unpaired z-test one-tail H1:mu_shade <mu_sun


standard deviation 12
z-statistic -1.876388
p-value 0.060602 0.030301
conclusion p-value > alpha , fail to reject H0 p-value < alpha , reject H0

ex 7.10
group A Group B
sample size 24 24
sample mean 77.5 65.83
sample sd 4.12 6.25
alpha 0.05

what test? unpaired t-test


sp 5.293
t-stat 7.637
pvalue 0.00000000102 < alpha reject H0

ex7.11

ranking from sample


sample1 65 sample1 40 1
sample1 40 sample1 48 2
sample1 72 sample1 50 3
sample1 62 sample1 55 4
sample1 50 sample2 56 5
sample1 48 sample2 59 6
sample1 60 sample1 60 7
sample1 55 sample1 62 8
sample1 72 sample2 63 9
sample1 65 sample2 64 10
sample2 69 sample1 65 11
sample2 64 sample1 65 12
sample2 65 sample2 65 13
sample2 78 sample2 69 14
sample2 59 sample2 71 15
sample2 56 sample1 72 16
sample2 72 sample1 72 17
sample2 71 sample2 72 18
sample2 82 sample2 78 19
sample2 63 sample2 82 20
w

w 83
nx 10
ny 10
N 20
T -22
Ts -1.663
pvalue 0.04

sample size 10 10
sample mean
sample sd
sp
t-stat
pvalue
mu_shade <mu_sun

means height of rose shaded is significantly smaller than planting on the sun
83

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy