Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The arrival rate of customers during the peak hours at the Phelps County Bank ca

ID: 3725359 • Letter: T

Question

The arrival rate of customers during the peak hours at the Phelps County Bank can be estimated by using the Poisson probability function as follows P(x) = where x is the number of customer arrivals per minute, is the average number of arrivals per minute. and e is a constant value known as the Euler's number whose value is 2.71828 For example, if the average number of customers entering the bank is three customers per minute, then is equal to three. Therefore, the probability of one customer arriving in any one minute (and then 2 customers) is as follows P(x = 1) = 0.149362 1! 0.224042 2! Write a C+Program using For loops and the Poisson probability function which estimates and then displays the probability of 1 to 10 customer arrivals in any one minute when the average arrival rate (2) (given as user input) is a. 3 customers per minute b. 5 customers per minute c. 7 customers per minute Your program should not accept any negative values and be able to run as many times as the user wants HINT: The denominator of the Poisson distribution function x! is the factorial of the value ofx. The general equation to compute the factorial of x is as follow x! = (x-(x-1)) × (x-(x-2)) x x (x-3)x(x _ 2) x (x-1)xx For example, the factorial of 5 is computed as 51-15-4) x(5-3) x(5-2) × (5-1) × 5-120 This generic formula to compute factorials can be designed in C++ using loops

Explanation / Answer

# include <iostream>

# include<math>

int main(void)

{

int f=1,i,j,k,l,m,x,y,z;

float e=2.71828;

cout<<"How many times you want to run";

cin>>i;

for(j=1; j<=i; j++)

{

for(k=3; k<=7; k=k+2)

{

x=pow(e,k);

for(l=1; l<=10; l++)

{

for(m=l-1; m>=0; m--)

{

f = f * (l-m);

}

y = pow(k,l);

z = (y * x)/f;

cout<<"Probability of"<<l<<"customer arrivals in any one minute when the average arrival rate ( "<<k<<") is"<<z<< ;

}

}

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote