<< Chapter < Page Chapter >> Page >

Finding the distribution from affine form

A mail order house is featuring three items (limit one of each kind per customer). Let

  • E 1 = the event the customer orders item 1, at a price of 10 dollars.
  • E 2 = the event the customer orders item 2, at a price of 18 dollars.
  • E 3 = the event the customer orders item 3, at a price of 10 dollars.

There is a mailing charge of 3 dollars per order.

We suppose { E 1 , E 2 , E 3 } is independent with probabilities 0.6, 0.3, 0.5, respectively. Let X be the amount a customer who orders the special items spends on them plus mailing cost. Then, in affine form,

X = 10 I E 1 + 18 I E 2 + 10 I E 3 + 3

We seek first the primitive form, using the minterm probabilities, which may calculated in this case by using the m-function minprob.

  1. To obtain the value of X on each minterm we
    • Multiply the minterm vector for each generating event by the coefficient for that event
    • Sum the values on each minterm and add the constant
    To complete the table, list the corresponding minterm probabilities.
    i 10 I E i 18 I E 2 10 I E 3 c s i p m i
    0 0 0 0 3 3 0.14
    1 0 0 10 3 13 0.14
    2 0 18 0 3 21 0.06
    3 0 18 10 3 31 0.06
    4 10 0 0 3 13 0.21
    5 10 0 10 3 23 0.21
    6 10 18 0 3 31 0.09
    7 10 18 10 3 41 0.09
    We then sort on the s i , the values on the various M i , to expose more clearly the primitive form for X .
    “primitive form” values
    i s i p m i
    0 3 0.14
    1 13 0.14
    4 13 0.21
    2 21 0.06
    5 23 0.21
    3 31 0.06
    6 31 0.09
    7 41 0.09
    The primitive form of X is thus
    X = 3 I M 0 + 13 I M 1 + 13 I M 4 + 21 I M 2 + 23 I M 5 + 31 I M 3 + 31 I M 6 + 41 I M 7
    We note that the value 13 is taken on on minterms M 1 and M 4 . The probability X has the value 13 is thus p ( 1 ) + p ( 4 ) . Similarly, X has value 31 on minterms M 3 and M 6 .
  2. To complete the process of determining the distribution, we list the sorted values and consolidate by adding togetherthe probabilities of the minterms on which each value is taken, as follows:
    k t k p k
    1 3 0.14
    2 13 0.14 + 0.21 = 0.35
    3 21 0.06
    4 23 0.21
    5 31 0.06 + 0.09 = 0.15
    6 41 0.09
    The results may be put in a matrix X of possible values and a corresponding matrix P X of probabilities that X takes on each of these values. Examination of the table shows that
    X = [ 3 13 21 23 31 41 ] and P X = [ 0 . 14 0 . 35 0 . 06 0 . 21 0 . 15 0 . 09 ]
    Matrices X and P X describe the distribution for X .

An m-procedure for determining the distribution from affine form

We now consider suitable MATLAB steps in determining the distribution from affine form, then incorporate these in the m-procedure canonic for carrying out the transformation. We start with the random variable in affine form, and suppose we have available, orcan calculate, the minterm probabilities.

  1. The procedure uses mintable to set the basic minterm vector patterns, then uses a matrix of coefficients, including theconstant term (set to zero if absent), to obtain the values on each minterm. The minterm probabilities are included in a row matrix.
  2. Having obtained the values on each minterm, the procedure performs the desired consolidation by using the m-function csort.

Steps in determining the distribution for X In [link]

>>c = [10 18 10 3]; % Constant term is listed last>>pm = minprob(0.1*[6 3 5]);>>M = mintable(3) % Minterm vector pattern M =0 0 0 0 1 1 1 1 0 0 1 1 0 0 1 10 1 0 1 0 1 0 1 % - - - - - - - - - - - - - - % An approach mimicking ``hand'' calculation>>C = colcopy(c(1:3),8) % Coefficients in position C =10 10 10 10 10 10 10 10 18 18 18 18 18 18 18 1810 10 10 10 10 10 10 10>>CM = C.*M % Minterm vector values CM =0 0 0 0 10 10 10 10 0 0 18 18 0 0 18 180 10 0 10 0 10 0 10>>cM = sum(CM) + c(4) % Values on minterms cM =3 13 21 31 13 23 31 41 % - - - - - - - - - - - - - % Practical MATLAB procedure>>s = c(1:3)*M + c(4) s =3 13 21 31 13 23 31 41>>pm = 0.14 0.14 0.06 0.06 0.21 0.21 0.09 0.09 % Extra zeros deleted>>const = c(4)*ones(1,8);} >>disp([CM;const;s;pm]') % Display of primitive form0 0 0 3 3 0.14 % MATLAB gives four decimals 0 0 10 3 13 0.140 18 0 3 21 0.06 0 18 10 3 31 0.0610 0 0 3 13 0.21 10 0 10 3 23 0.2110 18 0 3 31 0.09 10 18 10 3 41 0.09>>[X,PX] = csort(s,pm); % Sorting on s, consolidation of pm>>disp([X;PX]') % Display of final result3 0.14 13 0.3521 0.06 23 0.2131 0.15 41 0.09
Got questions? Get instant answers now!

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