document.write( "Question 1193750: An e-mail filter is planned to separate valid e-mails from spam. The word free occurs in 60% of the spam messages and only 4% of the valid messages. Also, 20% of the messages are spam. Determine the probabilities:
\n" ); document.write( "(a) the message contain free.
\n" ); document.write( "(b) the message is spam given that it contains free.
\n" ); document.write( "(c) the message is valid given that it does not contain free.
\n" ); document.write( "

Algebra.Com's Answer #825793 by ikleyn(52787)\"\" \"About 
You can put this solution on YOUR website!
.
\n" ); document.write( "An e-mail filter is planned to separate valid e-mails from spam.
\n" ); document.write( "The word free occurs in 60% of the spam messages and only 4% of the valid messages.
\n" ); document.write( "Also, 20% of the messages are spam. Determine the probabilities:
\n" ); document.write( "(a) the message contain free.
\n" ); document.write( "(b) the message is spam given that it contains free.
\n" ); document.write( "(c) the message is valid given that it does not contain free.
\n" ); document.write( "~~~~~~~~~~~~~\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\r\n" );
document.write( "Couple of notices before we start:\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "     (1)  20% of messages are spam --- hence (due to the context)  80%  (or 0.8)  of massages are valid.\r\n" );
document.write( "\r\n" );
document.write( "     (2)  4%, or 0.04 of valid messages contain free --- hence 1-0.04 = 0.96 valid messages DO NOT contain free.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "(a)  P(a message contain free) = 0.6*P(spam) + 0.04*P(valid) = 0.6*0.2 + 0.04*0.8 = 0.152.      ANSWER\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "(b)  It is about calculating conditional probability\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "     P(spam | contains \"free\") = P(spam AND contains free) / P(contains free) = \r\n" );
document.write( "\r\n" );
document.write( "                               = \"%280.2%2A0.6%29%2F0.152\" = 0.7895  (rounded)   ANSWER\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "     Notice to the calculation: the denominator of the fraction P(contains free) is just calculated in part (a) as 0.152.\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "(c)  It is about calculating conditional probability\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "     P(valid | does not contain free) = P(valid AND does not contain free) / P(does not contain free) = \r\n" );
document.write( "\r\n" );
document.write( "                                      = \"%280.8%2A%281-0.04%29%29%2F%281-0.152%29\" = 0.9057  (rounded).    ANSWER\r\n" );
document.write( "\r\n" );
document.write( "\r\n" );
document.write( "     Notice to the calculation: (1-0.04) comes from (2);  (1-0.152) is P(does not contain free), due to part (a).\r\n" );
document.write( "
\r
\n" ); document.write( "\n" ); document.write( "Solved and completed.\r
\n" ); document.write( "
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "
\n" ); document.write( "
\n" );