document.write( "Question 1199667: Jon buys a bag of cookies that contains 7 chocolate chip cookies, 6 peanut butter cookies, 8 sugar cookies and 5 oatmeal cookies. What is the probability that Jon randomly selects a chocolate chip cookie from the bag, eats it, then randomly selects a sugar cookie?\r
\n" ); document.write( "\n" ); document.write( "Probability =
\n" ); document.write( " (Round to 4 decimal places)
\n" ); document.write( "

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

\n" ); document.write( "A = event of selecting a chocolate chip cookie on the 1st selection
\n" ); document.write( "P(A) = (number of chocolate chip)/(number total)
\n" ); document.write( "P(A) = (7 chocolate chip)/(7+6+8+5 total)
\n" ); document.write( "P(A) = (7 chocolate chip)/(26 total)
\n" ); document.write( "P(A) = 7/26\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "The fact that Jon eats the 1st cookie means no replacement is done.
\n" ); document.write( "This will affect the probability of the 2nd cookie (hence the events aren't independent).\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "B = event of selecting a sugar cookie on the 2nd selection\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "P(B given A) = probability B happens if event A happened
\n" ); document.write( "P(B given A) = (number of sugar cookies)/(total number left)
\n" ); document.write( "P(B given A) = (8 sugar cookies)/(26-1 left over)
\n" ); document.write( "P(B given A) = (8 sugar cookies)/(25 left over)
\n" ); document.write( "P(B given A) = 8/25
\n" ); document.write( "For more information, search out \"conditional probability\".\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Lastly,
\n" ); document.write( "P(A and B) = P(A) * P(B given A)
\n" ); document.write( "P(A and B) = (7/26)*(8/25)
\n" ); document.write( "P(A and B) = 0.08615384615384 approximately
\n" ); document.write( "P(A and B) = 0.0862
\n" ); document.write( "There's about an 8.62% chance of this happening.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "-----------------------------------------------------\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Answer: 0.0862
\n" ); document.write( "
\n" ); document.write( "
\n" );