b:head_first_statistics:using_the_normal_distribution

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
b:head_first_statistics:using_the_normal_distribution [2025/10/08 03:10] – [Apply a continuity correction] hkimscilb:head_first_statistics:using_the_normal_distribution [2025/10/29 02:12] (current) – [All aboard the Love Train] hkimscil
Line 146: Line 146:
 [1] 0.9406201 [1] 0.9406201
 > pnorm(-1.56, lower.tail = FALSE) > pnorm(-1.56, lower.tail = FALSE)
 +[1] 0.9406201
 +> pnorm(-1.56, 0, 1, lower.tail = F)
 [1] 0.9406201 [1] 0.9406201
 > pnorm(64, 71, sqrt(20.25), lower.tail = FALSE) > pnorm(64, 71, sqrt(20.25), lower.tail = FALSE)
Line 151: Line 153:
  
 </code> </code>
 +
 +Note: 이제는 x축이 discrete 하지 않으므로 dnorm()과 같은 펑션을 써서 더할 수 없다 (할 수 있기는 하지만 간단하지 않다). 
 +
  
 ==== exercise ==== ==== exercise ====
 <WRAP box> <WRAP box>
-1. N(10, 4), value 6  +  - N(10, 4), value 6  
-2. N(6.3, 9), value 0.3 +  N(6.3, 9), value 0.3 
-3. N(2, 4). If the standard score is 0.5, what’s the value?  +  N(2, 4). If the standard score is 0.5, what’s the value?  
-4. The standard score of value 20 is 2. If the variance is 16, what’s the mean?+  The standard score of value 20 is 2. If the variance is 16, what’s the mean? 
 +</WRAP> 
 +<WRAP box> 
 +<code> 
 +  * 1 
 +pnorm(6, 10, sqrt(4), lower.tail = F) 
 +  * 2 
 +pnorm(0.3, 6.3, sqrt(9), lower.tail = F) 
 +  * 3 
 +0.5 = (v - 2)/sqrt(4) 
 +v-2 = 1 
 +v = 3 
 +  * 4 
 +z = (v - mean) / sd  
 +2 = (20 - mean) / sqrt(16) 
 +mean = 12 
 +</code>
 </WRAP> </WRAP>
  
Line 202: Line 223:
 \end{eqnarray*} \end{eqnarray*}
  
-<code>> 1-pnorm(-0.44)+<code> 
 +> 1-pnorm(-0.44)
 [1] 0.6700314 [1] 0.6700314
  
 +> pnorm(69, 71, sqrt(20.25), lower.tail = F)
 +[1] 0.6716394
 +
 +> z <- (69 - 71)/ sqrt(20.25)
 +> z
 +[1] -0.4444444
 +> pnorm(z, lower.tail = F)
 +[1] 0.6716394
 +
 +
 </code> </code>
  
Line 513: Line 545:
 rnorm(n, mean = 0, sd = 1) rnorm(n, mean = 0, sd = 1)
 </code> </code>
-</WRAP> 
-{{  :b:head_first_statistics:pasted:20201204-175705.png?500}} 
- 
- 
  
 +{{:b:head_first_statistics:pasted:20201204-175705.png?500}}
 따라서  따라서 
 $$P(X + Y < 380) = 0.9082409 $$ $$P(X + Y < 380) = 0.9082409 $$
 +</WRAP>
  
 ===== exercise ===== ===== exercise =====
-<WRAP info>+<WRAP box>
 Julie’s matchmaker is at it again. What's the **probability that a man will be at least 5 inches taller than a woman**? In Statsville, the height of men in inches is distributed as N(71, 20.25), and the height of women in inches is distributed as N(64, 16). Julie’s matchmaker is at it again. What's the **probability that a man will be at least 5 inches taller than a woman**? In Statsville, the height of men in inches is distributed as N(71, 20.25), and the height of women in inches is distributed as N(64, 16).
 </WRAP> </WRAP>
Line 532: Line 562:
  
 **probability that a man will be at least 5 inches taller than a woman**? = "probability that a man will be at least 5 inches taller than (an average) woman" 이므로 $P(X > F + 5)$ 을 구하라는 문제.  **probability that a man will be at least 5 inches taller than a woman**? = "probability that a man will be at least 5 inches taller than (an average) woman" 이므로 $P(X > F + 5)$ 을 구하라는 문제. 
 +
 \begin{align*} \begin{align*}
 P(X > F + 5) & = P(X - F > 5) P(X > F + 5) & = P(X - F > 5)
Line 581: Line 612:
 {{:b:head_first_statistics:pasted:20191114-072427.png}} {{:b:head_first_statistics:pasted:20191114-072427.png}}
  
 +기억: 
 +E(ax + b) = a E(x) + b
 +V(ax + b) = a^2 V(x) + 0
 +
 + 
 ===== Independent Observation  ===== ===== Independent Observation  =====
 Rather than transforming the weight of each adult, what we really need to figure out is <fc #ff0000>the probability distribution for the combined weight of four separate adults</fc>. In other words, we need to work out <fc #ff0000>the probability distribution of four independent observations of X</fc>. Rather than transforming the weight of each adult, what we really need to figure out is <fc #ff0000>the probability distribution for the combined weight of four separate adults</fc>. In other words, we need to work out <fc #ff0000>the probability distribution of four independent observations of X</fc>.
Line 656: Line 692:
 > pbinom(29,40, 1/4, lower.tail = F) > pbinom(29,40, 1/4, lower.tail = F)
 [1] 4.630881e-11 [1] 4.630881e-11
 +> dbinom(30:40,  40, 1/4)
 + [1] 4.140329e-11 4.451967e-12 4.173719e-13 3.372702e-14 2.314599e-15
 + [6] 1.322628e-16 6.123279e-18 2.206587e-19 5.806808e-21 9.926167e-23
 +[11] 8.271806e-25
 +> 1 - dbinom(0:29, 40, 1/4)
 + [1] 0.9999899 0.9998659 0.9991284 0.9963200 0.9886534 0.9727683
 + [7] 0.9470494 0.9142704 0.8821219 0.8602926 0.8556357 0.8687597
 +[13] 0.8942786 0.9240975 0.9512055 0.9718076 0.9853165 0.9930901
 +[19] 0.9970569 0.9988641 0.9996024 0.9998738 0.9999637 0.9999905
 +[25] 0.9999978 0.9999995 0.9999999 1.0000000 1.0000000 1.0000000
 +> sum(dbinom(30:40,  40, 1/4))
 +[1] 4.630881e-11
 +> 1 - sum(dbinom(0:29, 40, 1/4))
 +[1] 4.630896e-11
 +
 +
 </code> </code>
  
Line 778: Line 830:
  
 <WRAP box> <WRAP box>
-를 R을 이용하여 구하+를 R에서 해보면 
 <code> <code>
-pbinom(5, 12, 1/2)+> dbinom(0, 12, 1/2) + dbinom(1, 12, 1/2) + dbinom(2, 12, 1/2)  
 +>  + dbinom(3, 12, 1/2) + dbinom(4, 12, 1/2) + dbinom(5, 12, 1/2) 
 +[1] 0.387207
 </code> </code>
 +그러나, R에서는 더 간단한 방법으로 
 <code> <code>
 > pbinom(5, 12, 1/2) > pbinom(5, 12, 1/2)
Line 788: Line 842:
 </code> </code>
  
-는 아래와 같음을 이해해야 한+그리고, 의 dbinom으로 하나씩 계산한다고 하더라도 아래처럼 하게 된
 <code> <code>
 > sum(dbinom(c(0:5),12,1/2)) > sum(dbinom(c(0:5),12,1/2))
Line 874: Line 928:
 ===== Pool Puzzle ===== ===== Pool Puzzle =====
 <wrap #continuity_correction_egs /> <wrap #continuity_correction_egs />
-<WRAP help+<WRAP box
-X < 3  ----  <wrap spoiler> X < 2.5 </wrap> +X < 3   <wrap spoiler> X < 2.5 </wrap> 
-X > 3  ----  <wrap spoiler> X > 3.5 </wrap> +X > 3   <wrap spoiler> X > 3.5 </wrap> 
-X <_ 3  ----  <wrap spoiler> X < 3.5 </wrap> +X <_ 3   <wrap spoiler> X < 3.5 </wrap> 
-X >_ 3  ----  <wrap spoiler> X > 2.5 </wrap> +X >_ 3   <wrap spoiler> X > 2.5 </wrap> 
-3 <_ X < 10   ----  <wrap spoiler> 2.5 < X < 9.5 </wrap> +3 <_ X < 10    <wrap spoiler> 2.5 < X < 9.5 </wrap> 
-X = 0  ----  <wrap spoiler> -0.5 < X < 0.5 </wrap> +X = 0   <wrap spoiler> -0.5 < X < 0.5 </wrap> 
-3 <_ X <_ 10  ----  <wrap spoiler> 2.5 < X < 10.5 </wrap> +3 <_ X <_ 10   <wrap spoiler> 2.5 < X < 10.5 </wrap> 
-3 < X <_ 10  ----  <wrap spoiler> 3.5 < X < 10.5 </wrap> +3 < X <_ 10   <wrap spoiler> 3.5 < X < 10.5 </wrap> 
-X > 0  ----  <wrap spoiler> X > 0.5 </wrap> +X > 0   <wrap spoiler> X > 0.5 </wrap> 
-3 < X < 10  ----  <wrap spoiler> 3.5 < X < 9.5 </wrap>+3 < X < 10   <wrap spoiler> 3.5 < X < 9.5 </wrap>
 </WRAP> </WRAP>
  
Line 921: Line 975:
 {{:b:head_first_statistics:pasted:20191118-113020.png}} {{:b:head_first_statistics:pasted:20191118-113020.png}}
  
-$\lambda > 15$ 일 때, Poisson distribution, $X \sim Po(\lambda)$는 $X \sim N(\lambda, \lambda)$ 의 성격을 취한다.+<fc #ff0000>$\lambda > 15$ 일 때,</fc> Poisson distribution, $X \sim Po(\lambda)$는 $X \sim N(\lambda, \lambda)$ 의 성격을 취한다.
  
 예)  예) 
Line 970: Line 1024:
  
 $0.9654916 \sim 0.9656205$ $0.9654916 \sim 0.9656205$
 +
 +R에서 ppois을 이용하면
 +<code>
 +> ppois(51, 40)
 +[1] 0.9612598
 +
 +
 +</code>
  
 ===== Check up ===== ===== Check up =====
b/head_first_statistics/using_the_normal_distribution.1759893052.txt.gz · Last modified: by hkimscil

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki