<< Chapter < Page Chapter >> Page >

The m-procedures mgd and jmgd

The next example shows a fundamental limitation of the gend procedure. The values for the individual demands are not limited to integers, and there are considerablegaps between the values. In this case, we need to implement the moment generating function M D rather than the generating function g D .

In the generating function case, it is as easy to develop the joint distribution for { N , D } as to develop the marginal distribution for D . For the moment generating function, the joint distribution requires considerably more computation.As a consequence, we find it convenient to have two m-procedures: mgd for the marginal distribution and jmgd for the joint distribution.

Instead of the convolution procedure used in gend to determine the distribution for the sums of the individual demands, the m-procedure mgd utilizes them-function mgsum to obtain these distributions. The distributions for the various sums are concatenated into two row vectors, to which csort is applied to obtain the distributionfor the compound demand. The procedure requires as input the generating function for N and the actual distribution, Y and P Y , for the individual demands. For g N , it is necessary to treat the coefficients as in gend. However, the actual values and probabilitiesin the distribution for Y are put into a pair of row matrices. If Y is integer valued, there are no zeros in the probability matrix for missing values.

Noninteger values

A service shop has three standard charges for a certain class of warranty services it performs: $10, $12.50, and $15. The number of jobs received in a normal workday can be considered a random variable N which takes on values 0, 1, 2, 3, 4 with equal probabilities 0.2. The job types for arrivals may be represented by an iidclass { Y i : 1 i 4 } , independent of the arrival process. The Y i take on values 10, 12.5, 15 with respective probabilities 0.5, 0.3, 0.2. Let C be the total amount of services rendered in a day. Determine the distribution for C .

SOLUTION

gN = 0.2*[1 1 1 1 1];         % Enter dataY = [10 12.5 15];PY = 0.1*[5 3 2];mgd                           % Call for procedure Enter gen fn COEFFICIENTS for gN  gNEnter VALUES for Y  Y Enter PROBABILITIES for Y  PYValues are in row matrix D; probabilities are in PD. To view the distribution, call for mD.disp(mD)                      % Optional display of distribution          0    0.2000   10.0000    0.1000    12.5000    0.0600   15.0000    0.0400    20.0000    0.0500   22.5000    0.0600    25.0000    0.0580   27.5000    0.0240    30.0000    0.0330   32.5000    0.0450    35.0000    0.0570   37.5000    0.0414    40.0000    0.0353   42.5000    0.0372    45.0000    0.0486   47.5000    0.0468    50.0000    0.0352   52.5000    0.0187    55.0000    0.0075   57.5000    0.0019    60.0000    0.0003
Got questions? Get instant answers now!

We next recalculate [link] , above, using mgd rather than gend.

Recalculation of [link]

In [link] , we have

g N ( s ) = 1 5 ( 1 + s + s 2 + s 3 + s 4 ) g Y ( s ) = 0 . 1 ( 5 s + 3 s 2 + 2 s 3 )

This means that the distribution for Y is Y = [ 1 2 3 ] and P Y = 0 . 1 * [ 5 3 2 ] .

We use the same expression for g N as in [link] .

gN = 0.2*ones(1,5); Y = 1:3;PY = 0.1*[5 3 2];mgd Enter gen fn COEFFICIENTS for gN  gNEnter VALUES for Y  Y Enter PROBABILITIES for Y  PYValues are in row matrix D; probabilities are in PD. To view the distribution, call for mD.disp(mD)          0    0.2000    1.0000    0.1000     2.0000    0.1100    3.0000    0.1250     4.0000    0.1155    5.0000    0.1110     6.0000    0.0964    7.0000    0.0696     8.0000    0.0424    9.0000    0.0203    10.0000    0.0075   11.0000    0.0019    12.0000    0.0003P3 = (D==3)*PD' P3 =   0.1250ED = D*PD' ED =   3.4000P_4_12 = ((D>=4)&(D<=12))*PD' P_4_12 =  0.4650P7 = (D>=7)*PD' P7 =   0.1421

As expected, the results are the same as those obtained with gend.

Got questions? Get instant answers now!

If it is desired to obtain the joint distribution for { N , D } , we use a modification of mgd called jmgd . The complications come in placing the probabilities in the P matrix in the desired positions. This requires some calculations to determine the appropriate size of the matrices used as well as a procedure to put each probability in theposition corresponding to its D value. Actual operation is quite similar to the operation of mgd, and requires the same data format.

A principle use of the joint distribution is to demonstrate features of the model, such as E [ D | N = n ] = n E [ Y ] , etc. This, of course, is utilized in obtaining the expressions for M D ( s ) in terms of g N ( s ) and M Y ( s ) . This result guides the development of the computational procedures, but these do notdepend upon this result. However, it is usually helpful to demonstrate the validity of the assumptions in typical examples.

Remark . In general, if the use of gend is appropriate, it is faster and more efficient than mgd (or jmgd). And it will handle somewhat larger problems. But both m-procedures workquite well for problems of moderate size, and are convenient tools for solving various “compound demand” type problems.

Questions & Answers

A golfer on a fairway is 70 m away from the green, which sits below the level of the fairway by 20 m. If the golfer hits the ball at an angle of 40° with an initial speed of 20 m/s, how close to the green does she come?
Aislinn Reply
cm
tijani
what is titration
John Reply
what is physics
Siyaka Reply
A mouse of mass 200 g falls 100 m down a vertical mine shaft and lands at the bottom with a speed of 8.0 m/s. During its fall, how much work is done on the mouse by air resistance
Jude Reply
Can you compute that for me. Ty
Jude
what is the dimension formula of energy?
David Reply
what is viscosity?
David
what is inorganic
emma Reply
what is chemistry
Youesf Reply
what is inorganic
emma
Chemistry is a branch of science that deals with the study of matter,it composition,it structure and the changes it undergoes
Adjei
please, I'm a physics student and I need help in physics
Adjanou
chemistry could also be understood like the sexual attraction/repulsion of the male and female elements. the reaction varies depending on the energy differences of each given gender. + masculine -female.
Pedro
A ball is thrown straight up.it passes a 2.0m high window 7.50 m off the ground on it path up and takes 1.30 s to go past the window.what was the ball initial velocity
Krampah Reply
2. A sled plus passenger with total mass 50 kg is pulled 20 m across the snow (0.20) at constant velocity by a force directed 25° above the horizontal. Calculate (a) the work of the applied force, (b) the work of friction, and (c) the total work.
Sahid Reply
you have been hired as an espert witness in a court case involving an automobile accident. the accident involved car A of mass 1500kg which crashed into stationary car B of mass 1100kg. the driver of car A applied his brakes 15 m before he skidded and crashed into car B. after the collision, car A s
Samuel Reply
can someone explain to me, an ignorant high school student, why the trend of the graph doesn't follow the fact that the higher frequency a sound wave is, the more power it is, hence, making me think the phons output would follow this general trend?
Joseph Reply
Nevermind i just realied that the graph is the phons output for a person with normal hearing and not just the phons output of the sound waves power, I should read the entire thing next time
Joseph
Follow up question, does anyone know where I can find a graph that accuretly depicts the actual relative "power" output of sound over its frequency instead of just humans hearing
Joseph
"Generation of electrical energy from sound energy | IEEE Conference Publication | IEEE Xplore" ***ieeexplore.ieee.org/document/7150687?reload=true
Ryan
what's motion
Maurice Reply
what are the types of wave
Maurice
answer
Magreth
progressive wave
Magreth
hello friend how are you
Muhammad Reply
fine, how about you?
Mohammed
hi
Mujahid
A string is 3.00 m long with a mass of 5.00 g. The string is held taut with a tension of 500.00 N applied to the string. A pulse is sent down the string. How long does it take the pulse to travel the 3.00 m of the string?
yasuo Reply
Who can show me the full solution in this problem?
Reofrir Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Applied probability. OpenStax CNX. Aug 31, 2009 Download for free at http://cnx.org/content/col10708/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Applied probability' conversation and receive update notifications?

Ask