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 pot. The probability that he might have car trouble is pct. 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

0pct1

0pot1

N2

Input format

First line: pct

Second line: pot

Third line: N

Output format

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

Time Limit: 5
Memory Limit: 256
Source Limit:
Explanation

.

Editor Image

?