[R] Retrieve hypergeometric results in large scale

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Mon Oct 1 17:10:25 CEST 2012

Perhaps you should read


and if you have a hard time parsing that, then read


and then go back to

Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
Sent from my phone. Please excuse my brevity.

jas4710 <watashi at post.com> wrote:

>I'm going to use 
>dhyper(x, m, n, k)
>to get a 95% coverage. Let me use an example to explain my problem:
>Suppose I have a urn containing 90 red and 10 black balls.
>Now I wanna remove 3 from the urn. By the following codes:
>I can obtain the probability that 0,1,2,3 red balls will be removed.
> 0.000742115 0.025046382 0.247680891 0.726530612
>So >95% time, 2 to 3 red balls will be removed and the resultant
>will be changed to 
>87:10 or 88:9, the original percent of red balls will be changed from
>90 to
>89.69 to 90.72 then.
>If now I have 50:50 and again to remove 3 balls, I will obtain the
>probability as:
>0.1212 0.3788 0.3788 0.1212
>To get the resultant range of red balls for >95% time, this time all
>four cases have to consider and so the resultant change of red balls
>become 48.45 to 51.54
>So my problem is, is there any convenient built-in function that helps
>extract this 95% confidence interval-like data?
>View this message in context:
>Sent from the R help mailing list archive at Nabble.com.
>R-help at r-project.org mailing list
>PLEASE do read the posting guide
>and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list