In: Statistics and Probability
A door-to-door salesman sells pots and pans. He only gets in 50 percent of the houses that he visits. Of the houses that he enters, 1/6 of the householders are still not interested in purchasing anything, 1/2 of them end up placing a $60 order, and 1/3 of them end up placing a $100 order. Estimate the average sales receipts per house visit by simulating 25 house visits using a die. Calculate the theoretical value and compare it with the estimate obtained from your simulation.
We have 5 scenarios of the problem.
For simulation with a die we can restate the above scenarios as follows-
 .
 .
 .We create a simulation of 25 sample points for two dice.
| Simulation No. | First Die | Second Die | scenario | Order value | 
| 1 | 2 | 6 | 4 | 60 | 
| 2 | 5 | 6 | 1 | 0 | 
| 3 | 3 | 2 | 1 | 0 | 
| 4 | 6 | 2 | 4 | 60 | 
| 5 | 6 | 3 | 5 | 100 | 
| 6 | 1 | 3 | 1 | 0 | 
| 7 | 4 | 3 | 5 | 100 | 
| 8 | 6 | 2 | 4 | 60 | 
| 9 | 4 | 3 | 5 | 100 | 
| 10 | 3 | 5 | 1 | 0 | 
| 11 | 6 | 4 | 4 | 60 | 
| 12 | 3 | 3 | 1 | 0 | 
| 13 | 5 | 5 | 1 | 0 | 
| 14 | 4 | 1 | 3 | 0 | 
| 15 | 1 | 4 | 1 | 0 | 
| 16 | 6 | 2 | 4 | 60 | 
| 17 | 2 | 4 | 4 | 60 | 
| 18 | 1 | 3 | 1 | 0 | 
| 19 | 2 | 2 | 4 | 60 | 
| 20 | 6 | 4 | 4 | 60 | 
| 21 | 6 | 4 | 4 | 60 | 
| 22 | 5 | 6 | 1 | 0 | 
| 23 | 4 | 6 | 4 | 60 | 
| 24 | 6 | 3 | 5 | 100 | 
| 25 | 4 | 4 | 4 | 60 | 
| Total | - | - | - | 1060 | 
Note: Scenario 3,4,5 can only happen if scenario 2 occurs.
[
The simulation is done in R using the code as,
set.seed(123)                                                        
#set.seed keeps the takes the same sample from user to user
first_die <- sample(6,25,replace=T)
set.seed(321)
second_die <- sample(6,25,replace=T)
data.frame(first_die,second_die)
]
Now the Simulated estimate of average sales receipt per house
will be 
Simulated estimate of average sales receipt per house is $42.4.
Theoretical average Sales receipt per house will be

Theoretical average Sales receipt per house is $31.7.
So Simulated estimate of average sales receipt per house is higher than theoretical average sales receipt.
Please Upvote if the answer solves your problem.