RatnaKumari26 / python_tutorials

0 stars 0 forks source link

conditional probability #15

Open prakashjayy opened 2 years ago

prakashjayy commented 2 years ago

Consider the midterm and final for a statistics class. Suppose 13% of students earned an A on the midterm. Of those students who earned an A on the midterm, 47% received an A on the final, and 11% of the students who earned lower than an A on the midterm received an A on the final. You randomly pick up a final exam and notice the student received an A. What is the probability that this student earned an A on the midterm?

mid term

A = 0.13 = 13/100 Not A = 0.87 = 87/100

final

mid_term A and final A = = 13 0.47 = 6.11 mind term not A and final A = 87 0.11 = A = 870.11 + 13 0.47 = 9.57+ 6.11 = 15.68 NotA = 100-15.68 = 84.32

p(mid_term=A/final=A) = 6.11/15.68 =

total = 100 male = 50, female = 50 male age < 25 = 25, >25 = 25 female age < 25 = 20 > 25 = 30

p(male) = 50/100 p(female) = 50/100 p(male age < 25) = 25/100 p(male age > 25) = 25/100 p(female age < 25) = 20/100 p(female age > 25) = 30/100

p(male age > 25 / male) = 25/50 p(male age < 25 / male) = 25/50 p(woman age > 25 / male) = 20/50 p(woman age < 25 / male) = 30/50

100 -> male (0.5) -> age > 25 -> 25/50 -> age < 25 -> 25/50 -> female (0.5) -> age > 25 -> 20/50 -> age < 25 -> 25/50