summary_of_hypothesis_testing:output01
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| summary_of_hypothesis_testing:output01 [2025/11/30 15:31] – hkimscil | summary_of_hypothesis_testing:output01 [2025/11/30 15:42] (current) – hkimscil | ||
|---|---|---|---|
| Line 61: | Line 61: | ||
| > diff <- m.treated.s-mean(p1) | > diff <- m.treated.s-mean(p1) | ||
| > diff/se.z1 | > diff/se.z1 | ||
| - | [1] 1.451929 | + | [1] 1.501677 |
| > zscore <- diff/se.z1 | > zscore <- diff/se.z1 | ||
| > pnorm(zscore, | > pnorm(zscore, | ||
| - | [1] 0.1465213 | + | [1] 0.1331805 |
| > tscore <- zscore | > tscore <- zscore | ||
| > pt(tscore, df=length(treated.s)-1, | > pt(tscore, df=length(treated.s)-1, | ||
| - | [1] 0.1554272 | + | [1] 0.1421495 |
| > | > | ||
| > # usual way - using sample' | > # usual way - using sample' | ||
| Line 74: | Line 74: | ||
| > se.s <- sqrt(var(treated.s)/ | > se.s <- sqrt(var(treated.s)/ | ||
| > se.s | > se.s | ||
| - | [1] 1.549221 | + | [1] 1.599673 |
| > tscore <- diff/se.s | > tscore <- diff/se.s | ||
| > tscore | > tscore | ||
| - | [1] 1.562 | + | [1] 1.564567 |
| > | > | ||
| > | > | ||
| Line 110: | Line 110: | ||
| > abline(v=m.treated.s, | > abline(v=m.treated.s, | ||
| > se.s | > se.s | ||
| - | [1] 1.549221 | + | [1] 1.599673 |
| > se.z1 | > se.z1 | ||
| [1] 1.666667 | [1] 1.666667 | ||
| > | > | ||
| > c(m.treated.s-2*se.s, | > c(m.treated.s-2*se.s, | ||
| - | [1] 99.32144 105.51832 | + | [1] 99.30345 105.70214 |
| > c <- qt(0.975, n.s-1) | > c <- qt(0.975, n.s-1) | ||
| > c | > c | ||
| [1] 2.030108 | [1] 2.030108 | ||
| > c(m.treated.s-c*se.s, | > c(m.treated.s-c*se.s, | ||
| - | [1] 99.2748 105.5650 | + | [1] 99.25529 105.75030 |
| > m.p2 | > m.p2 | ||
| [1] 104 | [1] 104 | ||
| + | > | ||
| + | > x.p.est <- seq(m.treated.s-5*se.s, | ||
| + | + m.treated.s+5*se.z1, | ||
| + | + length.out = 500) | ||
| + | > y.p.est <- dnorm(x.p.est, | ||
| + | > | ||
| + | > plot(x.p.est, | ||
| + | + lwd=3, | ||
| + | + main = " | ||
| + | + xlab = " | ||
| + | > se1 <- c(m.treated.s-se.s, | ||
| + | > se2 <- c(m.treated.s-2*se.s, | ||
| + | > se3 <- c(m.treated.s-3*se.s, | ||
| + | > abline(v=c(m.treated.s, | ||
| + | + col=c(' | ||
| + | + ' | ||
| + | + ' | ||
| + | + lwd=2) | ||
| + | > | ||
| + | > | ||
| > | > | ||
| > | > | ||
| > pt(diff/ | > pt(diff/ | ||
| - | [1] 0.1272858 | + | [1] 0.1266823 |
| > t.test(treated.s, | > t.test(treated.s, | ||
| Line 132: | Line 152: | ||
| data: treated.s | data: treated.s | ||
| - | t = 1.562, df = 35, p-value = 0.1273 | + | t = 1.5646, df = 35, p-value = 0.1267 |
| alternative hypothesis: true mean is not equal to 100 | alternative hypothesis: true mean is not equal to 100 | ||
| 95 percent confidence interval: | 95 percent confidence interval: | ||
| - | 99.2748 105.5650 | + | 99.25529 105.75030 |
| sample estimates: | sample estimates: | ||
| mean of x | mean of x | ||
| - | 102.4199 | + | 102.5028 |
| > | > | ||
| </ | </ | ||
| - | {{.: | + | {{.: |
| - | {{.: | + | {{.: |
| + | {{.: | ||
summary_of_hypothesis_testing/output01.1764516700.txt.gz · Last modified: by hkimscil
