Project 18: Venn A or 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 85% (probability of .85) of the students at the school think the administration is doing a good job OR eats school lunch (this is called an inclusive or).

In the example above:  

P(A) = .55

P(B) = .5

P(A and B) = .2


Project 18:  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 'pAOrB' which represents the probability of A or 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