How do i generate normal and exponential distribution of customer
I have searched many link and could not get an idea. My program is used to simulate customer occurences in the store. The number of customer is predetermined by the user and it will let me generate a uniform, normal and exponential distribution throughout the number of days of the simulation.
Dim daysplit(days) As Integer Dim quotient As Integer quotient = Math.Floor(custcount / days) remainder = custcount Mod days
Dim currenttotal As Integer = 0 For k As Integer = 1 To days daysplit(k) = If(k < remainder, quotient + 1, quotient) daysplit(k) = quotient currenttotal += quotient Next For l As Integer = 1 To days If (currenttotal < custcount) Then daysplit(l) += 1 remainder -= 1 currenttotal += 1 End If Next
The code is used to generate the uniform distribution. How do i generate normal distribution and exponential distribution with a given sum.