R programming help needed Approximately 51 of the population
R programming help needed
Approximately 51% of the population is male (denoted M), and 49% is female (denoted F). Assume that if someone is male, the probability they need to correct their vision is 0.60, and the probability they do not is 0.40. Further, if someone is female, the probability they need to correct their vision is 0.65, and the probability they do not is 0.35. Let V be the event that someone needs to correct their vision. Create a function which simulates picking a random person n times, and calculates and returns the following probabilities:Solution
Male 51% -- correct vision -- 0.60 and not to correct --0.40
female 49% -- Correct vision -- 0.65 and not to correct --0.35
V- someone needs to correct
P(V) = P(MV)+P(FV) = 0.306+0.3185 = 0.6245
P(V\') = 1-0.6245 = 0.3755
P(MUV\') = P(M)+P(V\')-P(MV\') = 0.51+0.3755-0.51(0.40)
= 0.6815
P(M/V\') = P(MV\')/P(V\') = 0.2040/0.3755 =0.5433
