Project 16: Venn A Given B

Intro Problem: At a local high school, a random sample of students was taken.  The students were asked if they thought the administration was doing a good job and whether they eat school lunch.

A = thinks the administration is doing a good job

B = eats school lunch

Results: 

55% of the students stated the administration is doing a good job.  

50% of the students eat school lunch.  

20% of the students think the administration is doing a good job and eat school lunch.

We can use this information to determine that given that a student eats school lunch, there is a .6 probability that they think the administration is doing a good job.

In the example above:  

P(A) = .55

P(B) = .5

P(A and B) = .2


Project 16:  The variables 'pA', 'pB', and 'pAAndB' have been initialized.   These variables represent the probability of A, the probability of B, and the probability of A and B.

Task: Appropriately initialize the value of 'pAGivenB' which represents the probability of A given B.

**If your code works for 5 test cases, you can enter your e-mail address

Universal Computational Math Methods:

pow(5,2) returns 25.0

abs(-3.0) returns 3

sqrt(49.0) returns 7.0