b:r_cookbook:probability
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
b:r_cookbook:probability [2020/05/01 21:36] – [qt, pt] hkimscil | b:r_cookbook:probability [2025/09/17 08:22] (current) – [Plotting a Density Function] hkimscil | ||
---|---|---|---|
Line 53: | Line 53: | ||
> pnorm(84, mean=72, sd=15.2, lower.tail=FALSE) | > pnorm(84, mean=72, sd=15.2, lower.tail=FALSE) | ||
[1] .2149176 | [1] .2149176 | ||
+ | </ | ||
+ | < | ||
+ | > qnorm(.5) | ||
+ | [1] 0 | ||
+ | |||
+ | > qnorm(.975) | ||
+ | [1] 1.959964 | ||
+ | |||
+ | > qnorm(.975, lower.tail=F) # 오른쪽 부분이 .975일 때의 점수 | ||
+ | [1] -1.959964 | ||
+ | |||
> qnorm(.2149176, | > qnorm(.2149176, | ||
[1] 84 | [1] 84 | ||
Line 97: | Line 108: | ||
> qt(c(0.025, 0.975), df=100) | > qt(c(0.025, 0.975), df=100) | ||
[1] -1.983972 | [1] -1.983972 | ||
- | > | + | |
> qt(c(0.025, 0.975), df=400) | > qt(c(0.025, 0.975), df=400) | ||
[1] -1.965912 | [1] -1.965912 | ||
Line 298: | Line 309: | ||
</ | </ | ||
- | {{dnorm_x.png|Normal distribution plot}} | + | [{{: |
< | < | ||
Line 307: | Line 318: | ||
</ | </ | ||
- | {{standard_normal_distribution.png|standard_normal_distribution}} | + | [{{: |
- | < | + | < |
- | > region.x <- x[1 <= x & x <= 2] | + | # The body of the polygon follows the density curve where 1 <= z <= 2 |
- | > region.y <- y[1 <= x & x <= 2] | + | region.x <- x[1 <= x & x <= 2] |
- | > | + | region.y <- y[1 <= x & x <= 2] |
- | > # We add initial and final segments, which drop down to the Y axis | + | |
- | > region.x <- c(region.x[1], | + | # We add initial and final segments, which drop down to the Y axis |
- | > region.y <- c( 0, region.y, | + | region.x <- c(region.x[1], |
- | > polygon(region.x, | + | region.y <- c( 0, region.y, |
+ | polygon(region.x, | ||
</ | </ | ||
- | + | [{{: | |
- | {{standard_normal_distribution_1-2.png|standard_normal_distribution}} | + | |
b/r_cookbook/probability.1588336566.txt.gz · Last modified: 2020/05/01 21:36 by hkimscil