document.write( "Question 1197325: Five of 10 new buildings in a city violate the building code. A random sample of three buildings
\n" ); document.write( "selected for inspection.
\n" ); document.write( "a)What is the probability of none of the buildings violate the building code in a sample of 3 buildings\r
\n" ); document.write( "\n" ); document.write( "b)What is the probability of at least one of the new buildings violate the building code in a sample of 3 buildings?
\n" ); document.write( "

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

\n" ); document.write( "Part (a)\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "5 buildings violate code, 10-5 = 5 do not\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "5/10 = probability first selection doesn't violate code
\n" ); document.write( "4/9 = probability second selection doesn't violate code
\n" ); document.write( "3/8 = probability third selection doesn't violate code\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "The numerators decrease: 5,4,3
\n" ); document.write( "So do the denominators: 10,9,8
\n" ); document.write( "This assumes that we're sampling without replacement.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Multiply out the fractions to get this result
\n" ); document.write( "(5/10)*(4/9)*(3/8) = (5*4*3)/(10*9*8)
\n" ); document.write( "(5/10)*(4/9)*(3/8) = (5*4*3)/(2*5*3*3*2*4)
\n" ); document.write( "(5/10)*(4/9)*(3/8) = 1/(2*3*2)
\n" ); document.write( "(5/10)*(4/9)*(3/8) = 1/12\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "The probability of selecting 3 buildings that don't violate code is 1/12.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "----------------------------------------\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Alternate route:\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "n = 5 buildings that don't violate code
\n" ); document.write( "r = 3 selections
\n" ); document.write( "Use the nCr combination formula
\n" ); document.write( "n C r = (n!)/(r!(n-r)!)
\n" ); document.write( "5 C 3 = (5!)/(3!*(5-3)!)
\n" ); document.write( "5 C 3 = (5!)/(3!*2!)
\n" ); document.write( "5 C 3 = (5*4*3!)/(3!*2!)
\n" ); document.write( "5 C 3 = (5*4)/(2!)
\n" ); document.write( "5 C 3 = (5*4)/(2*1)
\n" ); document.write( "5 C 3 = (20)/(2)
\n" ); document.write( "5 C 3 = 10
\n" ); document.write( "There are 10 ways to pick three out of the five buildings that are to code.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Using that same formula, you should find that 10C3 = 120 which represents the number of ways to pick any three buildings (whether they are to code or not).\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "As you can probably see, we are using nCr instead of nPr because order doesn't matter. A grouping like ABC is the same as CBA.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "We have 10 ways to pick the three buildings that are to code out of 120 ways to pick the three buildings.
\n" ); document.write( "10/120 = 1/12\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "----------------------------------------\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Answer: 1/12\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "======================================================================\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Part (b)\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "We'll use the answer of the previous part.\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "The events \"all 3 don't violate code\" and \"at least one violates code\" are complementary events.
\n" ); document.write( "One or the other must happen. \r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "P(all 3 don't violate code) + P(at least one violates code) = 1
\n" ); document.write( "P(at least one violates code) = 1 - P(all 3 don't violate code)
\n" ); document.write( "P(at least one violates code) = 1 - 1/12
\n" ); document.write( "P(at least one violates code) = 12/12 - 1/12
\n" ); document.write( "P(at least one violates code) = (12 - 1)/12
\n" ); document.write( "P(at least one violates code) = 11/12\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "Answer: 11/12
\n" ); document.write( "
\n" ); document.write( "
\n" );