For these problems, you will need a basic understanding of Bayes'
Theorem (conditional probability) and of the concept of expected
value. Decision trees use the idea of expected value to graphically
represent each condition and choice. I hope these are covered in your
textbook? I will briefly go over them.
Bayes' theorm states that he probability of A given B equals the
probability of B given A times the probability of A, divided by the
probability of B.
Also written P(A|B) = P(B|A) * P(A) / P(B)
Expected value is the sum over all possible outcomes, of the value of
an outcome multiplied by the probability of that outcome. For
example, imagine a 100-ticket raffle with a payout of $50. The
?expected payout? is 0.01*$50 + 0.99*$0 = $0.50. So, if an
organization sells 100 tickets at $1 each, they will turn a profit.
For a tutorial, I recommend the following links:
A humorous and readable introduction to Bayes Theorem. This includes
A Bayes theorem calculator.
A nice approach to decision trees that includes calculation of
expected values, and probabilities of an outcome.
Using Bayes' Theorem, the probability of this beverage being
successful, given that it received a favorable report, is the
probability of receiving a successful report given that the beverage
was successful, times the probability of being successful, divided by
the probability of receiving a favorable report.
P = 0.8 * 0.4 / (0.4*0.8 + 0.6*0.3) = 0.64
Another way to think about it, is to calculate all four possibilities first:
Successful + favorable report = 0.4 * 0.8 = 0.32
Unsuccessful + favorable report = 0.6 * 0.3 = 0.18
Successful + unfavorable report = 0.4 * (1 ? 0.8) = 0.08
Unsuccessful + unfavorable report = 0.6 * (1 ? 0.3) = 0.42
They sum to 1, so my math is correct!
The fraction of successful beverages among those receiving a favorable
report is 0.32/(0.32+0.18) = 0.64
Predicted Cold + Cold = 0.7 * 0.6 = 0.42
Predicted Cold + Hot = 0.7 * (1 ? 0.6) = 0.28
Predicted Hot + Hot = 0.6 * (1 ? 0.6) = 0.24
Predicted Hot + Cold = 0.6 * 0.6 = 0.36
The probability that it will be cold given that it is forecast to be
cold is the probability that it was forecast to be cold given that it
is cold, times the probability that it will be cold, divided by the
probability that it will be forecast to be cold -- 0.42 / (0.42 +
0.28) = 0.6
- what is the probability the weather will be hot given the forecast of hot?
The probability that it will be hot given that it is forecast to be
hot is the probability that it was forecast to be hot given that it is
hot, times the probability that it will be hot, divided by the
probability that it will be forecast to be hot.
Deciding which product is more profitable to sell requires calculating
the expected value of both choices. A decision tree works for this,
although a table in a spreadsheet works also.
The expected value is the profit from a particular product and
situation, multiplied by the probability that that situation will
Given the prediction for cold weather, the probability of cold is 0.6.
Likewise, the probability of hot weather is 0.4.
The expected value of selling hotdogs is 0.4*$60 + 0.6*$50 = $54
The expected value of selling softdrinks is 0.4*$90 + 0.6*$30 = $54
The vendor should use factors other than the weather to decide whether
to sell hotdogs or softdrinks. Perhaps it is easier to carry hotdogs?
Perhaps softdrinks help him stick to his diet? Perhaps he prefers a
risk ? if so he should sell softdrinks, since in reality he will
either make a large profit or a small one. The expected profit, based
on the weather, is the same either way.
Again, the expected demand is the sum, over all levels of demand, of
the product of a demand of N kg multiplied by the probability of that
level of demand. The probability of a particular level of demand is
the number of days at that demand level, divided by the total number
Thus expand your table:
P-DEMAND 0.1 0.2 0.4 0.3
The expected demand level is 0.1*10 + 0.2*11 + 0.4*12 + 0.3*13 = 11.9
kg of mushrooms.
A decision tree could help the retailer decide how many mushrooms to
buy; a table showing the expected profit from each combination, and a
calculation of the profit from each purchase volume is also effective.
Post your answer in a request for clarification, and I will let you
know my answer.
I used the Wikipedia's definition of Bayes' Theorem for reference.
I hope you find this helpful, and can solve problems after seeing some
examples. If you have any questions, feel free to ask for a Request
for Clarification. And, let me know how many mushrooms you think the
retailer should buy, and I will let you know what I think. ;)
Clarification of Answer by
02 Oct 2005 08:34 PDT
Hello again curiousmaz,
I'm glad you liked that Bayes Theorem explanation. I think it has
enough substance to make up for its saccharine enthusiasm. It looks
like you are on the right track now, in understanding this type of
I thought that the demand for 12 kg occured on 36 days, and the demand
for 13 occured on 27, which is how I got the probabilities reversed.
Also, I think he recieves a REFUND for the unsold mushrooms -- so, if
he buys 13 kg, but only sells 12 his records will look like this:
10/1/2005 purchased 13 kg mushrooms -$26
10/1/2005 sold 12 kg mushrooms +$60
10/2/2005 returned 1 kg mushrooms +$2
Net profit (2+60-26) = $36
I made a table for both cases, showing the demand paired with the profit:
BOUGHT 12 kg
DEMAND 10, profit 29.5
DEMAND 11, profit 33
DEMAND 12, profit 36
DEMAND 13, profit 36
Expected Profit = 0.1*29.5 + 0.2*33 + 0.3*36 + 0.4*36 = 34.75
BOUGHT 13 kg
DEMAND 10, profit 28.5
DEMAND 11, profit 32.5
DEMAND 12, profit 36
DEMAND 13, profit 39
Expected Profit = 0.1*28.5 + 0.2*32.5 + 0.3*36 + 0.4*39 = 35.75
Let me know if anything else is unclear.