"Binom.test()"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
5번째 줄: 5번째 줄:
{{참고|Excel BINOM.DIST()}}
{{참고|Excel BINOM.DIST()}}
* less
* less
<source lang='php'>
<syntaxhighlight lang='php'>
=BINOM.DIST(27, 50, 0.65, TRUE)
=BINOM.DIST(27, 50, 0.65, TRUE)
// 0.070961261
// 0.070961261
</source>
</syntaxhighlight>
* greater
* greater
<source lang='php'>
<syntaxhighlight lang='php'>
=BINOM.DIST(50-27, 50, 1-0.65, TRUE)
=BINOM.DIST(50-27, 50, 1-0.65, TRUE)
// 0.96035885
// 0.96035885
</source>
</syntaxhighlight>


==PHP==
==PHP==
19번째 줄: 19번째 줄:
{{참고|PHP stats_cdf_binomial()}}
{{참고|PHP stats_cdf_binomial()}}
* less
* less
<source lang='php'>
<syntaxhighlight lang='php'>
var_dump( stats_cdf_binomial(27, 50, 0.65, 1) );
var_dump( stats_cdf_binomial(27, 50, 0.65, 1) );
# float(0.070961261354415)
# float(0.070961261354415)
</source>
</syntaxhighlight>
* greater
* greater
<source lang='php'>
<syntaxhighlight lang='php'>
var_dump( stats_cdf_binomial(50-27, 50, 1-0.65, 1) );
var_dump( stats_cdf_binomial(50-27, 50, 1-0.65, 1) );
# float(0.96035885036097)
# float(0.96035885036097)
</source>
</syntaxhighlight>


==R==
==R==
33번째 줄: 33번째 줄:
{{참고|R언어 binom.test()}}
{{참고|R언어 binom.test()}}
* less
* less
<source lang='r'>
<syntaxhighlight lang='r'>
> binom.test(27, 50, .65, alternative="less")$p.value
> binom.test(27, 50, .65, alternative="less")$p.value
[1] 0.07096126
[1] 0.07096126
</source>
</syntaxhighlight>
* greater
* greater
<source lang='r'>
<syntaxhighlight lang='r'>
> binom.test(27, 50, .65, alternative="greater")$p.value
> binom.test(27, 50, .65, alternative="greater")$p.value
[1] 0.9603589
[1] 0.9603589
</source>
</syntaxhighlight>
* two-sided
* two-sided
<source lang='r'>
<syntaxhighlight lang='r'>
> binom.test(27, 50, .65)$p.value
> binom.test(27, 50, .65)$p.value
[1] 0.1051942
[1] 0.1051942
> binom.test(27, 50, .65, alternative="two.sided")$p.value
> binom.test(27, 50, .65, alternative="two.sided")$p.value
[1] 0.1051942
[1] 0.1051942
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==
* [[이항검정]]
* [[이항검정]]

2020년 11월 2일 (월) 02:34 판

binom.test()

1 Excel

  • less
=BINOM.DIST(27, 50, 0.65, TRUE)
// 0.070961261
  • greater
=BINOM.DIST(50-27, 50, 1-0.65, TRUE)
// 0.96035885

2 PHP

  • less
var_dump( stats_cdf_binomial(27, 50, 0.65, 1) );
# float(0.070961261354415)
  • greater
var_dump( stats_cdf_binomial(50-27, 50, 1-0.65, 1) );
# float(0.96035885036097)

3 R

  • less
> binom.test(27, 50, .65, alternative="less")$p.value
[1] 0.07096126
  • greater
> binom.test(27, 50, .65, alternative="greater")$p.value
[1] 0.9603589
  • two-sided
> binom.test(27, 50, .65)$p.value
[1] 0.1051942
> binom.test(27, 50, .65, alternative="two.sided")$p.value
[1] 0.1051942

4 같이 보기

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