document.write( "Question 1190165: Hi, please help me out! I am a bit confused.\r
\n" ); document.write( "\n" ); document.write( "A bag contains 8 blue, 7 red, 5 pink and 10 orange jelly beans. Six jellybeans are to be selected at random without replacement.\r
\n" ); document.write( "\n" ); document.write( "A. What type of distribution is this? (Uniform, Binomial, Geometric, or Hypergeometric)\r
\n" ); document.write( "\n" ); document.write( "B. What is the probability that at least one of the jelly beans picked is orange?\r
\n" ); document.write( "\n" ); document.write( "C. What is the expected number of pink jelly beans to be selected? (Which expectance formula should I use? They all vary for the type of distribution so I am confused)
\n" ); document.write( "

Algebra.Com's Answer #821741 by math_tutor2020(3817)\"\" \"About 
You can put this solution on YOUR website!

\n" ); document.write( "Answers:
  • A) Hypergeometric
  • B) 0.93472275 approximately
  • C) 1
==================================================
\n" ); document.write( "Explanation for part A\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "The uniform distribution is where the probability of any outcome is the same. For example, rolling a single six-sided die has each side with uniform probability 1/6.
\n" ); document.write( "We rule out \"uniform distribution\" because the probabilities aren't all the same for this jelly bean problem.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "The binomial distribution can be ruled out as well. This is due to the phrasing \"without replacement\". \r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "The geometric distribution isn't used because we aren't interested in questions like \"what is the probability of getting blue on the first selection? second selection? etc\".\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "We use the hypergeometric distribution, which is effectively the binomial distribution but without replacement.
\n" ); document.write( "This distribution is useful to list out the possible X values and their corresponding P(X) values.
\n" ); document.write( "The X values refer to the counts of a certain color. Refer to parts B or C for more info.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "==================================================
\n" ); document.write( "Explanation for part B\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Let's compute the probability of getting all six jelly beans that aren't orange.
\n" ); document.write( "We have 8 blue + 7 red + 5 pink = 20 beans that aren't orange out of 8+7+5+10 = 30 jelly beans total.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "The probability of getting six beans in a row that aren't orange is
\n" ); document.write( "P(6 not orange) = (20/30)*(19/29)*(18/28)*(17/27)*(16/26)*(15/25)
\n" ); document.write( "P(6 not orange) = 0.06527725
\n" ); document.write( "Notice the numerators counting down (20,19,...) and the denominators are counting down as well (30,29,...). This is caused by the fact the previous selection is not replaced.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Subtract this value from 1 to get
\n" ); document.write( "P(at least one orange) = 1 - P(6 non orange)
\n" ); document.write( "P(at least one orange) = 1 - 0.06527725
\n" ); document.write( "P(at least one orange) = 0.93472275\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "The events \"selecting 6 non orange\" and \"at least one orange\" are complementary events. One or the other must happen.
\n" ); document.write( "Therefore the two event probabilities add to 1, which is why that previous formula is useful.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Side note: as an alternative path, you can use the formula mentioned in part C. Plug in N = 30, n = 6, K = 20, k = 6 to get the result 0.06527725 which you subtract from 1 to get the final answer for this part.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "==================================================
\n" ); document.write( "Explanation for part C\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "X = number of pink selected
\n" ); document.write( "The set of possible X values is {0,1,2,3,4,5}\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Use the hypergeometric probability formula to calculate each P(X) for the set of X values mentioned.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "We'll think of each outcome as \"pink\" vs \"not pink\".
\n" ); document.write( "There are 5 pink and 25 non pink.
  • N = population size = 30 beans total
  • n = sample size = 6 beans selected
  • K = number of pink overall in population = 5
  • k = number of pink selected = varies from 0 to 5 i.e. those X values mentioned earlier
The convention is that the uppercase letters N and K go with the population counts (total beans and pink beans); while the lowercase counterparts count the sample values.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "I'll show the steps on how to calculate P(X = 0)
\n" ); document.write( "In other words when k = 0
\n" ); document.write( "\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( " approximately\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "For more information, check out this link about the hypergeometric distribution
\n" ); document.write( "https://online.stat.psu.edu/stat414/lesson/7/7.4
\n" ); document.write( "The notation C(n,r) refers to the nCr combination formula. Sometimes it's written in the form of \r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "This is a useful free calculator to help check your answers
\n" ); document.write( "https://stattrek.com/online-calculator/hypergeometric.aspx\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "You'll follow similar steps for k = 1 through k = 5\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Here's a table of the results
\n" ); document.write( "The P(X) values are approximate and rounded to 6 decimal places.\n" ); document.write( "\n" ); document.write( "
XP(X)
00.298261
10.447392
20.213044
30.038735
40.002526
50.000042

\n" ); document.write( "Next, we'll multiply each X and P(X) value to form a new column\n" ); document.write( "\n" ); document.write( "
XP(X)X*P(X)
00.2982610
10.4473920.447392
20.2130440.426088
30.0387350.116205
40.0025260.010104
50.0000420.000210

\n" ); document.write( "From here you need to add up the X*P(X) results
\n" ); document.write( "0+0.447392+0.426088+0.116205+0.010104+0.000210 = 0.999999\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "That effectively rounds to 1
\n" ); document.write( "I suspect that the true exact answer is 1 if there wasn't rounding error (when computing the approximate P(X) values).\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "We expect about 1 pink jelly bean will be in the sample size of 6.
\n" ); document.write( "
\n" ); document.write( "
\n" );