Let X be the random demand following Binomial (n=10, p=0.33)
Let Y be the no. of bags bought
Now, we have three cases:
For each sold bag, the profit is +$5
For each unsold bag, the profit is -$10
For each demand without bag, the profit is +$0
Let the profit function be f(x, y)
Obviously, f(x, y=0) = $0
Obviously, E[f(x, y > 10)] < E[f(x, y=10)
Hence, the possible answer would be either 1, 2, 3, 4, 5, 6, 7, 8, 9, or 10
With excel, we would work out all the possible results:
f(0, 1) = -$0.17, f(1, 1) = $0.43, f(2, 1) = $0.98, f(3, 1) = $1.30, f(4, 1) = $1.14, f(5, 1) = $0.68, f(6, 1) = $0.28, f(7, 1) = $0.08, f(8, 1) = $0.02, f(9, 1) = $0.00, f(10, 1) = $0.00, and thus E[f(x, 1)] = $4.74
f(0, 2) = -$0.35, f(1, 2) = -$0.43, f(2, 2) = $1.95, f(3, 2) = $2.60, f(4, 2) = $2.28, f(5, 2) = $1.37, f(6, 2) = $0.57, f(7, 2) = $0.16, f(8, 2) = $0.03, f(9, 2) = $0.00, f(10, 2) = $0.00, and thus E[f(x, 2)] = $8.18
f(0, 3) = -$0.52, f(1, 3) = -$1.30, f(2, 3) = $0.00, f(3, 3) = $3.90, f(4, 3) = $3.41, f(5, 3) = $2.05, f(6, 3) = $0.85, f(7, 3) = $0.24, f(8, 3) = $0.05, f(9, 3) = $0.01, f(10, 3) = $0.00, and thus E[f(x, 3)] = $8.69
f(0, 4) = -$0.69, f(1, 4) = -$2.17, f(2, 4) = -$1.95, f(3, 4) = $1.30, f(4, 4) = $4.55, f(5, 4) = $2.73, f(6, 4) = $1.14, f(7, 4) = $0.33, f(8, 4) = $0.06, f(9, 4) = $0.01, f(10, 4) = $0.00, and thus E[f(x, 4)] = $5.30
f(0, 5) = -$0.87, f(1, 5) = -$3.03, f(2, 5) = -$3.90, f(3, 5) = -$1.30, f(4, 5) = $2.28, f(5, 5) = $3.41, f(6, 5) = $1.42, f(7, 5) = $0.41, f(8, 5) = $0.08, f(9, 5) = $0.01, f(10, 5) = $0.00, and thus E[f(x, 5)] = -$1.50
2010-03-18 12:05:04 補充:
f(0, 6) = -$1.04, f(1, 6) = -$3.90, f(2, 6) = -$5.85, f(3, 6) = -$3.90, f(4, 6) = $0.00, f(5, 6) = $2.05, f(6, 6) = $1.71, f(7, 6) = $0.49, f(8, 6) = $0.09, f(9, 6) = $0.01, f(10, 6) = $0.00, and thus E[f(x, 6)] = -$10.35
2010-03-18 12:05:12 補充:
f(0, 7) = -$1.21, f(1, 7) = -$4.77, f(2, 7) = -$7.80, f(3, 7) = -$6.50, f(4, 7) = -$2.28, f(5, 7) = $0.68, f(6, 7) = $1.14, f(7, 7) = $0.57, f(8, 7) = $0.11, f(9, 7) = $0.01, f(10, 7) = $0.00, and thus E[f(x, 7)] = -$20.06
2010-03-18 12:05:20 補充:
f(0, 8) = -$1.39, f(1, 8) = -$5.64, f(2, 8) = -$9.75, f(3, 8) = -$9.10, f(4, 8) = -$4.55, f(5, 8) = -$0.68, f(6, 8) = $0.57, f(7, 8) = $0.41, f(8, 8) = $0.12, f(9, 8) = $0.01, f(10, 8) = $0.00, and thus E[f(x, 8)] = -$30.01
2010-03-18 12:05:28 補充:
f(0, 9) = -$1.56, f(1, 9) = -$6.50, f(2, 9) = -$11.71, f(3, 9) = -$11.71, f(4, 9) = -$6.83, f(5, 9) = -$2.05, f(6, 9) = $0.00, f(7, 9) = $0.24, f(8, 9) = $0.09, f(9, 9) = $0.02, f(10, 9) = $0.00, and thus E[f(x, 9)] = -$40.00
2010-03-18 12:05:35 補充:
f(0, 10) = -$1.73, f(1, 10) = -$7.37, f(2, 10) = -$13.66, f(3, 10) = -$14.31, f(4, 10) = -$9.10, f(5, 10) = -$3.41, f(6, 10) = -$0.57, f(7, 10) = $0.08, f(8, 10) = $0.06, f(9, 10) = $0.01, f(10, 10) = $0.00, and thus E[f(x, 10)] = -$50.00
2010-03-18 12:05:42 補充:
Hence, the optimal no. of bag would be 3
2010-03-18 14:21:33 補充:
f(x, y) = ($5) * y if x >= y
= ($5) * x + (-$10) * (y – x) if x < y
E[f(x, y)] = summation of Pr (X = x) * f(x, y) = summation of 10Cx * [(1 / 3) ^ x] * [(1 – 1 / 3) ^ (10 – x)] * f(x, y)
2010-03-18 14:21:49 補充:
I don't know how to work it out analytically