"R 이항검정"의 두 판 사이의 차이

 
(사용자 3명의 중간 판 14개는 보이지 않습니다)
1번째 줄: 1번째 줄:
;R binom.test()
==개요==
;R언어 binom.test()
* [[이항검정]]을 수행하고 결과를 알려주는 R언어 함수


==양측 검정==
==양측 검정==
<source lang='r'>
<syntaxhighlight lang='r' run>
> binom.test(27,50,.50)
binom.test(27,50,.50)
 
</syntaxhighlight>
Exact binomial test
:→ 50회 시행 중 27회 나타남
 
:→ 대립가설: 실제 확률은 0.5가 아니다. (양측 검정)
data: 27 and 50
:→ P값: 0.6718
number of successes = 27, number of trials = 50, p-value = 0.6718
:→ 95퍼센트 유의구간: 0.3932420 ~ 0.6818508
alternative hypothesis: true probability of success is not equal to 0.5
95 percent confidence interval:
0.3932420 0.6818508
sample estimates:
probability of success
                  0.54
</source>


==단측 검정==
==단측 검정==
<source lang='r'>
<syntaxhighlight lang='r' run>
> binom.test(27,50,.50,alternative="greater")
binom.test(27,50,.50,alternative="greater")
 
</syntaxhighlight>
Exact binomial test
:→ 50회 시행 중 27회 나타남
:→ 대립가설: 실제 확률은 0.5보다 크다. (단측 검정)
:→ P값: 0.3359
:→ 95퍼센트 유의구간: 0.4147572 ~ 1.0000000


data:  27 and 50
==P값만 추출==
number of successes = 27, number of trials = 50, p-value = 0.3359
<syntaxhighlight lang='r' run>
alternative hypothesis: true probability of success is greater than 0.5
binom.test(27,50,.50,alternative="greater")$p.value
95 percent confidence interval:
</syntaxhighlight>
0.4147572 1.0000000
sample estimates:
probability of success
                  0.54
</source>


==같이 보기==
==같이 보기==
* [[binom.test()]]
* [[이항검정]]
* [[이항검정]]
* [[R 언어]]
* [[R 언어]]


[[분류: 이항분포]]
[[분류: 이항분포]]
[[분류: R]]
[[분류: R stats]]

2021년 3월 11일 (목) 22:37 기준 최신판

1 개요[ | ]

R언어 binom.test()
  • 이항검정을 수행하고 결과를 알려주는 R언어 함수

2 양측 검정[ | ]

binom.test(27,50,.50)
→ 50회 시행 중 27회 나타남
→ 대립가설: 실제 확률은 0.5가 아니다. (양측 검정)
→ P값: 0.6718
→ 95퍼센트 유의구간: 0.3932420 ~ 0.6818508

3 단측 검정[ | ]

binom.test(27,50,.50,alternative="greater")
→ 50회 시행 중 27회 나타남
→ 대립가설: 실제 확률은 0.5보다 크다. (단측 검정)
→ P값: 0.3359
→ 95퍼센트 유의구간: 0.4147572 ~ 1.0000000

4 P값만 추출[ | ]

binom.test(27,50,.50,alternative="greater")$p.value

5 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}