In: Math
In a store, 40% of customers make a single purchase. This activity requires a time that has an exponential distribution with mean 2.0 minutes. The other 60% of customers ask for information before making a purchase. This process requires time and has a symmetric triangular distribution with between 1 and 5 minutes (in addition to the purchase time). Use Bernoulli, exponential and triangular random variates to generate a sample of shopping times for 200 customers. Plot the histogram of these observations.
Can you show steps in excel or what should I put in the column?
40% of the customers make a single purchase and 60% of the customers ask for information before making a purchase.
This is a Bernoulli distribution with probability p=0.40 that the customers make a single purchase
steps to simulate this
The single purchase requires a time that has an exponential distribution with mean 2.0 minutes.
Let X be the time required for a single purchase. X has exponential distribution with parameter
The pdf of X is
The cdf of X is
We will get the inverse of this cdf using
Using the inverse cdf method we use the following steps to simulate the time required for a single purchase.
The time required to ask for information before making a purchase that has has a symmetric triangular distribution with between 1 and 5 minutes. Since this is symmetric, the most likely value is (5+1)/2=3
Let Y be the time required to ask for information before making a purchase . Y has a triangular distribution with parameters a=1,b=5 and c=3
The pdf of Y is
The CDF of Y is
The inverse of cdf for 1<x<=3 is
The values of u for 1<x<=3 is 0<u<1/2
The inverse of cdf for 3<x<=5 is
The values of u for 3<x<=5 is 1/2<u<1
The steps for generating the time required to ask for information before making a purchase are
We prepare the following sheet
Copy the rows to create 200 trials. Paste as values to avoid changes
Get this
get the histogram of the total time using
data--->data analysis--->histogram
get this
format as needed