Hypergeometic

Hypergeometic - Y is 2 = V ( Y ) = n p r N P p N-r N P p...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Hypergeometric Distribution A random variable Y has a hypergeometric distribution if A sample of size n is selected without replacement from a population of size N . Each member of the population belongs to one of two groups; success or failure. The number of successes in the population is denoted as r and therefore the number of failures in the population is N - r . The random variable Y is the total number of successes in the sample. The parameters for the hypergeometric random variable Y are the sample size n , the popu- lation size N and the number of successes in the population r . The probability distribution function of Y is P ( Y = y ) = p ( y ) = ( r y )( N - r n - y ) ( N n ) y = 0 , 1 , . . . , n where y r and n - y N - r The theoretical mean of the hypergeometric random variable Y is μ = E ( Y ) = nr N The variance of the hypergeometric random variable
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Y is 2 = V ( Y ) = n p r N P p N-r N P p N-n N-1 P Working with hypergeometric random variables in R. To Fnd a probability P ( Y = y ) = p ( y ) for a single value y , the command in R is dhyper(y,r,N-r,n) To Fnd the probability P ( Y y ), use the sum command to add up all p ( y ) values for y between and including 0 and y . sum(dhyper(0:y,r,N-r,n)) To Fnd the probability P ( y 1 Y y 2 ), use the sum command to add up all p ( y ) values for y between and including y 1 and y 2 . sum(dhyper(y1:y2,r,N-r,n)) To Fnd the probability P ( Y y ), use the sum command to add up all p ( y ) values between and including y and n . sum(dhyper(y:n,r,N-r,n)) 1...
View Full Document

Ask a homework question - tutors are online