X is the number of red balls contained in the sample. X can have values 0, 1, 2, 3, 4 (sample size is 5, but we have only 4 red balls).
"P(X=0) = \\frac{C^8_5}{C^{12}_5} = \\frac{8! 7! 5!}{5!3! 12!} = \\frac{4*5*6*7}{9*10*11*12}=0.071"
Here we divide number of ways to chose 0 red balls from red balls to amount of ways to choose any 5 balls.
"P(X=1) = \\frac{C^4_8*C^1_4}{C^{5}_{12}} = \\frac{8! 4! 5! 7!}{4! 4! 3! 12!} = 0.354"
"P(X=2) = \\frac{C^3_8*C^2_4}{C^{5}_{12}} = \\frac{8! 4! 5! 7!}{3! 5! 2! 2! 12!} = 0.424"
"P(X=3) = \\frac{C^2_8*C^3_4}{C^{5}_{12}} = \\frac{8! 4! 5! 7!}{2! 6! 3! 12!} = 0.141"
"P(X=4) = \\frac{C^1_8}{C^{5}_{12}} = \\frac{8! 5! 7!}{7! 12!} = 0.01"
The distribution looks like:
X 0 1 2 3 4
P(X) 0.071 0.354 0.424 0.141 0.01
The check for this is "\\sum P(X)=1"
Comments
Leave a comment