User Tools

Site Tools


sample_proportions_is_not_a_binomial_distribution:code01

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
sample_proportions_is_not_a_binomial_distribution:code01 [2025/11/12 07:40] – removed - external edit (Unknown date) 127.0.0.1sample_proportions_is_not_a_binomial_distribution:code01 [2025/11/12 07:40] (current) – ↷ Page moved from sampling_proportion_is_not_binomial_distribution:code01 to sample_proportions_is_not_a_binomial_distribution:code01 hkimscil
Line 1: Line 1:
 +<code>
 +1 - pbinom(30, 100, 1/4)
 +pbinom(30, 100, 1/4, lower.tail = F)
  
 +# 위의 문제를 normal distriubtion으로 계산한다면 
 +# exp(k) = np, var(k) = npq 이므로
 +n <- 100
 +p <- 1/4
 +q <- 1-p
 +e.k <- n*p
 +v.k <- n*p*q
 +e.k
 +v.k
 +sd.k <- sqrt(v.k)
 +
 +x <- 0:50 
 +plot(dbinom(x, n, p), type="l")
 +# 위에서 P(x > 30) 을 묻는 문제
 +pnorm(30, e.k, sd.k, lower.tail = F)
 +# cc를 적용하면 
 +pnorm(30.5, e.k, sd.k, lower.tail = F)
 +
 +# P(x<_25)? 
 +pbinom(25, n, p)
 +pnorm(25, e.k, sd.k)
 +pnorm(25.5, e.k, sd.k)
 +</code>

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki