A salesperson in a large bicycle shop is paid a bonus if he
Solution
a)
Our task is to simulate n number of days and find the bonus earned by the salesman each day using the various probabilities given.
So, first we choose a large number of n, say 10,000. Then we iterate through the 10,000 days.
For each day, the probability that he sells more than 4 bicycles and hence earn bonus is 0.6. So, we generate a random number and compare it with 0.6. If it is less than 0.6, we calculate the bonus.
To calculate the bonus for that day, we need the number of cycles sold and of which type.
So, based on the probability distribution given for the number of cycles sold, we chose number of cycles sold each day. We do this by generating a random number and comparing it with 0.35, 0.35+0.45=0.8 and 0.8+0.15=0.95 to simulate the number of cycles sold that day.
Then we need to find the type of cycle for each cycle. We do this by iterating through each cycle sold and finding the type of cycle based on the given probability distribution.
When we get cycle type for each cycle, we add the bonus of that cycle to the total bonus for the day.
Similarly, We calculate the total bonus for 10,000 days and divide it by 10,000 to find the average bonus for each day.
b)
To find out the 95% confidence interval for the mean bonus amount, we need to find area under the probability distribution curve of the mean. The middle 95% area represents the confidence interval.
