conditional prob

Posted on 2013-06-05
Last Modified: 2013-06-06

I know the answer but I cant work this out.  It should be a conditional prob question

For a particular petrol station 30% of customers buy ‘super’ and 60% buy unleaded and
10% diesel. When a customer buys super there is a 25% chance they will fill the tank.
Customers buying unleaded have a 20% chance they will fill the tank. Of those buying
diesel, 70% fill their tank.

Given that a car leaving the petrol station has a full tank, what is the probability that
the tank contains unleaded petrol?
Question by:jagguy
  • 4
  • 3
  • 2
  • +2
LVL 26

Expert Comment

ID: 39222419
First let me ask if I have the correct answer since you say you already know.  Is it 12% chance?

Let's say there are 10 people.

10 * 30% = 3 people buy super
10 * 60% = 6 people buy unleaded
10 * 10% = 1 person buys diesel

6 * 20% = 1.2 people that buy unleaded will fill their tank

1.2 / 10 = .12 (12%) probability that the car leaving will with a full tank will have unleaded.

Does this follow with what you have for an answer?
LVL 37

Expert Comment

ID: 39222420
Draw it out as a grid.

                  full         not full
super      .3*.25        .3*.75

Now fill out the rest of the table.

If you add up the first column, you will have the total probability of a full tank. What percent of that is from unleaded?
LVL 27

Expert Comment

ID: 39222434
The best way to do these problems is to draw the full probability tree.

The top three-way branch is 30, 60, 10

Each of those branches twice into Fill/No_Fill

That gives you six possibilities on the bottom row.

Collect the Fill terms and scale the sum of the probabilities back to 100%.
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

LVL 37

Expert Comment

ID: 39222442
pony10us, that is the chance that any car will leave with a full tank of unleaded.

Given that a car's tank is full, the probability that it is unleaded is between 40 and 50%

I know the exact answer, but I don't want to post it until the asker does.
LVL 37

Accepted Solution

TommySzalapski earned 500 total points
ID: 39222464
Remember the probability of A given B is the probability that both are true divided by the probability that B is true

P(A|B) = P(A and B)/P(B)

So what is P(A and B) and what is P(B)?

Either the table or the tree will give you both.
LVL 26

Expert Comment

ID: 39222595

Okay, I think I understand.  If I am correct then I may be closer to the answer.  I was only partially through the process apparently.

Been a long time since I did any math like this and it intrigued me.

LVL 32

Expert Comment

ID: 39223133
From a layman's approach -
If 200 customers by petrol, 120 buy unleaded, 60 buy super, and 20 buy diesel.
The 120 unleaded customers fill up 24 times, the super customers 15 times, and the diesel customers 14 times. So a total of 53 customers have full tanks, 24 of which are unleaded.
LVL 37

Expert Comment

ID: 39223167
Yes. That is precisely the same thing that the table or tree would get you, except they use 1 (100%) instead of 200.
LVL 32

Expert Comment

ID: 39223191
Thanks, Tommy. I think it's just easier for us dummies to think in terms of 24, 15, and 14 people as opposed to .12, .075, and .07 people. :-)

Author Comment

ID: 39224232
the answer is .4528

Author Closing Comment

ID: 39224235
well done
LVL 26

Expert Comment

ID: 39225729

Exactly what I ended up with after Tommy corrected my logic.  :)

Thanks Tommy.

the formula I have on an excel spreadsheet is:


I imagine there is a simpler method though.

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Where can I find renown online tutoring services? 7 45
logic in c# 10 72
Graph Function 6 97
Restarting the Universe - A Thought Experiment 19 94
A Guide to the PMT, FV, IPMT and PPMT Functions In MS Excel we have the PMT, FV, IPMT and PPMT functions, which do a fantastic job for interest rate calculations.  But what if you don't have Excel ? This article is for programmers looking to re…
Complex Numbers are funny things.  Many people have a basic understanding of them, some a more advanced.  The confusion usually arises when that pesky i (or j for Electrical Engineers) appears and understanding the meaning of a square root of a nega…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question