Conditional Probability and Bayes' theorem

0

0 votes
Statistics, bayes theorem, Probability and Statistics, product rule, Very-Easy, conditional probability, chain rule, Bayes' theorem
Problem

Bob has an important meeting tomorrow and he has to reach office on time in morning. His general mode of transport is by car and on a regular day (no car trouble) the probability that he will reach on time is . The probability that he might have car trouble is . If the car runs into trouble he will have to take a train and only 2 trains out of the available N trains will get him to office on time.

What are the chances that he will reach office on time tomorrow?

Input constraints

Input format

First line:

Second line:

Third line: N

Output format

Probability he will reach in time, rounded to six decimal digits

Sample Input
0.2
0.3
10
Sample Output
0.280000
Time Limit: 5
Memory Limit: 256
Source Limit:
Explanation

.

Editor Image

?