r:general_statistics
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| r:general_statistics [2019/10/10 22:46] – [Forming a Confidence Interval for a Mean] hkimscil | r:general_statistics [2019/10/10 22:56] (current) – [Forming a Confidence Interval for a Mean] hkimscil | ||
|---|---|---|---|
| Line 512: | Line 512: | ||
| > SE | > SE | ||
| [1] 2.458358 | [1] 2.458358 | ||
| - | > E <- qt(.975, df=n-1)*SE | + | ## qt fun: qt(prob, df) zscore 2점에 해당하는 점수는? |
| + | > qtv <- qt(.975, df=n-1) | ||
| + | > qtv | ||
| + | [1] | ||
| + | ## qtv는 2에 해당하는 95퍼센트 CL | ||
| + | ## 이 때의 CI는 | ||
| + | > E <- qtv*SE | ||
| > E | > E | ||
| [1] 4.940254 | [1] 4.940254 | ||
| Line 520: | Line 526: | ||
| </ | </ | ||
| - | < | + | < |
| + | > t.test(x, mu=98) | ||
| One Sample t-test | One Sample t-test | ||
| data: x | data: x | ||
| - | t = 39.052, df = 49, p-value | + | t = 0.37089, df = 49, p-value |
| - | alternative hypothesis: true mean is not equal to 0 | + | alternative hypothesis: true mean is not equal to 98 |
| 95 percent confidence interval: | 95 percent confidence interval: | ||
| - | | + | |
| sample estimates: | sample estimates: | ||
| mean of x | mean of x | ||
| - | 96.00386 | + | 98.83223 |
| + | |||
| + | > t.test(x, mu=100) | ||
| + | |||
| + | One Sample t-test | ||
| + | |||
| + | data: x | ||
| + | t = -0.52043, df = 49, p-value = 0.6051 | ||
| + | alternative hypothesis: true mean is not equal to 100 | ||
| + | 95 percent confidence interval: | ||
| + | 94.32303 103.34143 | ||
| + | sample estimates: | ||
| + | mean of x | ||
| + | | ||
| + | |||
| + | > t.test(x, mu=95) | ||
| + | |||
| + | One Sample t-test | ||
| + | |||
| + | data: x | ||
| + | t = 1.7079, df = 49, p-value = 0.09399 | ||
| + | alternative hypothesis: true mean is not equal to 95 | ||
| + | 95 percent confidence interval: | ||
| + | 94.32303 103.34143 | ||
| + | sample estimates: | ||
| + | mean of x | ||
| + | | ||
| + | |||
| + | > | ||
| </ | </ | ||
r/general_statistics.1570747585.txt.gz · Last modified: by hkimscil
