Skip to main content
Statistics LibreTexts

9.2: Problems on Independent Classes of Random Variables

  • Page ID
    10860
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Exercise \(\PageIndex{1}\)

    The pair \(\{X, Y\}\) has the joint distribution (in m-file npr08_06.m):

    \(X =\) [-2.3 -0.7 1.1 3.9 5.1] \(Y =\) [1.3 2.5 4.1 5.3]

    \[P=\left[\begin{array}{lllll}
    0.0483 & 0.0357 & 0.0420 & 0.0399 & 0.0441 \\
    0.0437 & 0.0323 & 0.0380 & 0.0361 & 0.0399 \\
    0.0713 & 0.0527 & 0.0620 & 0.0609 & 0.0551 \\
    0.0667 & 0.0493 & 0.0580 & 0.0651 & 0.0589
    \end{array}\right]\]

    Determine whether or not the pair \(\{X, Y\}\) is independent.

    Answer
    npr08_06
    Data are in X, Y, P
    itest
    Enter matrix of joint probabilities  P
    The pair {X,Y} is NOT independent
    To see where the product rule fails, call for D
    disp(D)
         0     0     0     1     1
         0     0     0     1     1
         1     1     1     1     1
         1     1     1     1     1

    Exercise \(\PageIndex{2}\)

    The pair \(\{X, Y\}\) has the joint distribution (in m-file npr09_02.m):

    \(X =\) [-3.9 -1.7 1.5 2.8 4.1] \(Y =\) [-2 1 2.6 5.1]

    \[P=\left[\begin{array}{lllll}
    0.0589 & 0.0342 & 0.0304 & 0.0456 & 0.0209 \\
    0.0961 & 0.0556 & 0.0498 & 0.0744 & 0.0341 \\
    0.0682 & 0.0398 & 0.0350 & 0.0528 & 0.0242 \\
    0.0868 & 0.0504 & 0.0448 & 0.0672 & 0.0308
    \end{array}\right]\]

    Determine whether or not the pair \(\{X, Y\}\) is independent.

    Answer
    npr09_02
    Data are in X, Y, P
    itest
    Enter matrix of joint probabilities  P
    The pair {X,Y} is NOT independent
    To see where the product rule fails, call for D
    disp(D)
         0     0     0     0     0
         0     1     1     0     0
         0     1     1     0     0
         0     0     0     0     0

    Exercise \(\PageIndex{3}\)

    The pair \(\{X, Y\}\) has the joint distribution (in m-file npr08_07.m):

    \(P(X = t, Y = u)\)

    t = -3.1 -0.5 1.2 2.4 3.7 4.9
    u = 7.5 0.0090 0.0396 0.0594 0.0216 0.0440 0.0203
    4.1 0.0495 0 0.1089 0.0528 0.0363 0.0231
    -2.0 0.0405 0.1320 0.0891 0.0324 0.0297 0.0189
    -3.8 0.0510 0.0484 0.0726 0.0132 0 0.0077

    Determine whether or not the pair \(\{X, Y\}\) is independent.

    Answer
    npr08_07
    Data are in X, Y, P
    itest
    Enter matrix of joint probabilities  P
    The pair {X,Y} is NOT independent
    To see where the product rule fails, call for D
    disp(D)
         1     1     1     1     1     1
         1     1     1     1     1     1
         1     1     1     1     1     1
         1     1     1     1     1     1
    

    For the distributions in Exercises 4-10 below

    1. Determine whether or not the pair is independent.
    2. Use a discrete approximation and an independence test to verify results in part (a).

    Exercise \(\PageIndex{4}\)

    \(f_{XY} (t, u) = 1/\pi\) on the circle with radius one, center at (0,0).

    Answer

    Not independent by the rectangle test.

    tuappr
    Enter matrix [a b] of X-range endpoints  [-1 1]
    Enter matrix [c d] of Y-range endpoints  [-1 1]
    Enter number of X approximation points  100
    Enter number of Y approximation points  100
    Enter expression for joint density  (1/pi)*(t.^2 + u.^2<=1)
    Use array operations on X, Y, PX, PY, t, u, and P
    itest
    Enter matrix of joint probabilities  P
    The pair {X,Y} is NOT independent
    To see where the product rule fails, call for D  % Not practical-- too large

    Exercise \(\PageIndex{5}\)

    \(f_{XY} (t, u) = 1/2\) on the square with vertices at (1, 0), (2, 1), (1, 2), (0, 1) (see Exercise 11 from "Problems on Random Vectors and Joint Distributions").

    Answer

    Not independent, by the rectangle test.

    tuappr
    Enter matrix [a b] of X-range endpoints  [0 2]
    Enter matrix [c d] of Y-range endpoints  [0 2]
    Enter number of X approximation points  200
    Enter number of Y approximation points  200
    Enter expression for joint density  (1/2)*(u<=min(1+t,3-t)).* ...
       (u>=max(1-t,t-1))
    Use array operations on X, Y, PX, PY, t, u, and P
    itest
    Enter matrix of joint probabilities  P
    The pair {X,Y} is NOT independent
    To see where the product rule fails, call for D

    Exercise \(\PageIndex{6}\)

    \(f_{XY} (t, u) = 4t (1 - u)\) for \(0 \le t \le 1\), \(0 \le u \le 1\) (see Exercise 12 from "Problems on Random Vectors and Joint Distributions").

    From the solution for Exercise 12 from "Problems on Random Vectors and Joint Distributions" we have

    \(f_X (t) = 2t\), \(0 \le t \le 1\), \(f_Y(u) = 2(1 - u)\), \(0 \le u \le 1\), \(f_{XY} = f_X f_Y\)

    so the pair is independent.

    Answer
    tuappr
    Enter matrix [a b] of X-range endpoints  [0 1]
    Enter matrix [c d] of Y-range endpoints  [0 1]
    Enter number of X approximation points  100
    Enter number of Y approximation points  100
    Enter expression for joint density  4*t.*(1-u)
    Use array operations on X, Y, PX, PY, t, u, and P
     
     
     
    itest
    Enter matrix of joint probabilities  P
    The pair {X,Y} is independent
    

    Exercise \(\PageIndex{7}\)

    \(f_{XY} = \dfrac{1}{8} (t + u)\) for \(0 \le t \le 2\), \(0 \le u \le 2\) (see Exercise 13 from "Problems on Random Vectors and Joint Distributions").

    From the solution of Exercise 13 from "Problems on Random Vectors and Joint Distributions" we have

    \(f_X (t) = f_Y(t) = \dfrac{1}{4} (t + 1)\), \(0 \le t \le 2\)

    so \(f_{XY} \ne f_X f_Y\) which implies the pair is not independent.

    Answer
    tuappr
    Enter matrix [a b] of X-range endpoints  [0 2]
    Enter matrix [c d] of Y-range endpoints  [0 2]
    Enter number of X approximation points  100
    Enter number of Y approximation points  100
    Enter expression for joint density  (1/8)*(t+u)
    Use array operations on X, Y, PX, PY, t, u, and P
    itest
    Enter matrix of joint probabilities  P
    The pair {X,Y} is NOT independent
    To see where the product rule fails, call for D
    

    Exercise \(\PageIndex{8}\)

    \(f_{XY} (t, u) = 4ue^{-2t}\) for \(0 \le t, 0 \le u \le 1\) (see Exercise 14 from "Problems on Random Vectors and Joint Distributions").

    From the solution for Exercise 14 from "Problems on Random Vectors and Joint Distribution" we have

    \(f_X (t) = 2e^{-2t}\), \(0 \le t\), \(f_Y(u) = 2u\), \(0 \le u \le 1\)

    so that \(f_{XY} = f_X f_Y\) and the pair is independent.

    Answer
    tuappr
    Enter matrix [a b] of X-range endpoints  [0 5]
    Enter matrix [c d] of Y-range endpoints  [0 1]
    Enter number of X approximation points  500
    Enter number of Y approximation points  100
    Enter expression for joint density  4*u.*exp(-2*t)
    Use array operations on X, Y, PX, PY, t, u, and P
    itest
    Enter matrix of joint probabilities  P
    The pair {X,Y} is independent       % Product rule holds to within 10^{-9}
    

    Exercise \(\PageIndex{9}\)

    \(f_{XY} (t, u) = 12t^2 u\) on the parallelogram with vertices (-1, 0), (0, 0), (1, 1), (0, 1)

    (see Exercise 16 from "Problems on Random Vectors and Joint Distributions").

    Answer

    Not independent by the rectangle test.

    tuappr
    Enter matrix [a b] of X-range endpoints  [-1 1]
    Enter matrix [c d] of Y-range endpoints  [0 1]
    Enter number of X approximation points  200
    Enter number of Y approximation points  100
    Enter expression for joint density  12*t.^2.*u.*(u<=min(t+1,1)).* ...
              (u>=max(0,t))
    Use array operations on X, Y, PX, PY, t, u, and P
    itest
    Enter matrix of joint probabilities  P
    The pair {X,Y} is NOT independent
    To see where the product rule fails, call for D

    Exercise \(\PageIndex{10}\)

    \(f_{XY} = \dfrac{24}{11}tu\) for \(0 \le t \le 2\), \(0 \le u \le \text{min} \{1, 2-t\}\) (see Exercise 17 from "Problems on Random Vectors and Joint Distributions").

    Answer

    By the rectangle test, the pair is not independent.

    tuappr
    Enter matrix [a b] of X-range endpoints  [0 2]
    Enter matrix [c d] of Y-range endpoints  [0 1]
    Enter number of X approximation points  200
    Enter number of Y approximation points  100
    Enter expression for joint density  (24/11)*t.*u.*(u<=min(1,2-t))
    Use array operations on X, Y, PX, PY, t, u, and P
    itest
    Enter matrix of joint probabilities  P
    The pair {X,Y} is NOT independent
    To see where the product rule fails, call for D

    Exercise \(\PageIndex{11}\)

    Two software companies, MicroWare and BusiCorp, are preparing a new business package in time for a computer trade show 180 days in the future. They work independently. MicroWare has anticipated completion time, in days, exponential (1/150). BusiCorp has time to completion, in days, exponential (1/130). What is the probability both will complete on time; that at least one will complete on time; that neither will complete on time?

    Answer
    p1 = 1 - exp(-180/150)
    p1 =  0.6988
    p2 = 1 - exp(-180/130)
    p2 =  0.7496
    Pboth = p1*p2
    Pboth =  0.5238
    Poneormore = 1 - (1 - p1)*(1 - p2) % 1 - Pneither
    Poneormore =  0.9246
    Pneither = (1 - p1)*(1 - p2)
    Pneither =    0.0754

    Exercise \(\PageIndex{12}\)

    Eight similar units are put into operation at a given time. The time to failure (in hours) of each unit is exponential (1/750). If the units fail independently, what is the probability that five or more units will be operating at the end of 500 hours?

    Answer
    p = exp(-500/750);  % Probability any one will survive
    P = cbinom(8,p,5)   % Probability five or more will survive
    P =  0.3930

    Exercise \(\PageIndex{13}\)

    The location of ten points along a line may be considered iid random variables with symmytric triangular distribution on [1,3]. What is the probability that three or more will lie within distance 1/2 of the point \(t = 2\)?

    Answer

    Geometrically, \(p = 3/4\), so that P = cbinom(10,p,3) = 0.9996.

    Exercise \(\PageIndex{14}\)

    A Christmas display has 200 lights. The times to failure are iid, exponential (1/10000). The display is on continuously for 750 hours (approximately one month). Determine the probability the number of lights which survive the entire period is at least 175, 180, 185, 190.

    Answer
    p = exp(-750/10000)
    p =  0.9277
    k = 175:5:190;
    P = cbinom(200,p,k);
    disp([k;P]')
      175.0000    0.9973
      180.0000    0.9449
      185.0000    0.6263
      190.0000    0.1381

    Exercise \(\PageIndex{15}\)

    A critical module in a network server has time to failure (in hours of machine time) exponential (1/3000). The machine operates continuously, except for brief times for maintenance or repair. The module is replaced routinely every 30 days (720 hours), unless failure occurs. If successive units fail independently, what is the probability of no breakdown due to the module for one year?

    Answer
    p = exp(-720/3000)
    p = 0.7866     % Probability any unit survives
    P = p^12    % Probability all twelve survive (assuming 12 periods)
    P = 0.056

    Exercise \(\PageIndex{16}\)

    Joan is trying to decide which of two sales opportunities to take.

    • In the first, she makes three independent calls. Payoffs are $570, $525, and $465, with respective probabilities of 0.57, 0.41, and 0.35.
    • In the second, she makes eight independent calls, with probability of success on each call \(p =\) 0.57. She realizes $150 profit on each successful sale.

    Let \(X\) be the net profit on the first alternative and \(Y\) be the net gain on the second. Assume the pair \(\{X, Y\}\) is independent.

    1. Which alternative offers the maximum possible gain?
    2. Compare probabilities in the two schemes that total sales are at least $600, $900, $1000, $1100.
    3. What is the probability the second exceeds the first— i.e., what is \(P(Y > X)\)?
    Answer

    \(X = 570 I_A + 525 I_B + 465I_C\) with \([P(A) P(B) P(C)]\) = [0.57 0.41 0.35]. \(Y = 150 S\). where \(S~\) binomial (8, 0.57).

    c = [570 525 465 0];
    pm = minprob([0.57 0.41 0.35]);
    canonic                              % Distribution for X
     Enter row vector of coefficients  c
     Enter row vector of minterm probabilities  pm
    Use row matrices X and PX for calculations
    Call for XDBN to view the distribution
    Y = 150*[0:8];                       % Distribution for Y
    PY = ibinom(8,0.57,0:8);
    icalc                                % Joint distribution
    Enter row matrix of X-values  X
    Enter row matrix of Y-values  Y
    Enter X probabilities  PX
    Enter Y probabilities  PY
     Use array operations on matrices X, Y, PX, PY, t, u, and P
    xmax = max(X)
    xmax =   1560
    ymax = max(Y)
    ymax =   1200
    k = [600 900 1000 1100];
    px = zeros(1,4);
     
     
     
    for i = 1:4
        px(i) = (X>=k(i))*PX';
    end
    py = zeros(1,4);
    for i = 1:4
      py(i) = (Y>=k(i))*PY';
    end
    disp([px;py]')
        0.4131    0.7765
        0.4131    0.2560
        0.3514    0.0784
        0.0818    0.0111
    M = u > t;
    PM = total(M.*P)
    PM = 0.5081          % P(Y>X)

    Exercise \(\PageIndex{17}\)

    Margaret considers five purchases in the amounts 5, 17, 21, 8, 15 dollars with respective probabilities 0.37, 0.22, 0.38, 0.81, 0.63. Anne contemplates six purchases in the amounts 8, 15, 12, 18, 15, 12 dollars. with respective probabilities 0.77, 0.52, 0.23, 0.41, 0.83, 0.58. Assume that all eleven possible purchases form an independent class.

    1. What is the probability Anne spends at least twice as much as Margaret?
    2. What is the probability Anne spends at least $30 more than Margaret?
    Answer
    cx = [5 17 21 8 15 0];
    pmx = minprob(0.01*[37 22 38 81 63]);
    cy = [8 15 12 18 15 12 0];
    pmy = minprob(0.01*[77 52 23 41 83 58]);
    [X,PX] = canonicf(cx,pmx);
    [Y,PY] = canonicf(cy,pmy);
    icalc
    Enter row matrix of X-values  X
    Enter row matrix of Y-values  Y
    Enter X probabilities  PX
    Enter Y probabilities  PY
     Use array operations on matrices X, Y, PX, PY, t, u, and P
    M1 = u >= 2*t;
    PM1 = total(M1.*P)
    PM1 =  0.3448
    M2 = u - t >=30;
    PM2 = total(M2.*P)
    PM2 =  0.2431

    Exercise \(\PageIndex{18}\)

    James is trying to decide which of two sales opportunities to take.

    • In the first, he makes three independent calls. Payoffs are $310, $380, and $350, with respective probabilities of 0.35, 0.41, and 0.57.
    • In the second, he makes eight independent calls, with probability of success on each call p=0.57. He realizes $100 profit on each successful sale.

    Let \(X\) be the net profit on the first alternative and \(Y\) be the net gain on the second. Assume the pair \(\{X, Y\}\) is independent.

    • Which alternative offers the maximum possible gain?
    • What is the probability the second exceeds the first— i.e., what is \(P(Y > X)\)?
    • Compare probabilities in the two schemes that total sales are at least $600, $700, $750.
    Answer
    cx = [310 380 350 0];
    pmx = minprob(0.01*[35 41 57]);
    Y  = 100*[0:8];
    PY = ibinom(8,0.57,0:8);
    canonic
     Enter row vector of coefficients  cx
     Enter row vector of minterm probabilities  pmx
    Use row matrices X and PX for calculations
    Call for XDBN to view the distribution
    icalc
    Enter row matrix of X-values  X
    Enter row matrix of Y-values  Y
    Enter X probabilities  PX
    Enter Y probabilities  PY
     Use array operations on matrices X, Y, PX, PY, t, u, and P
    xmax = max(X)
    xmax =  1040
    ymax = max(Y)
    ymax =   800
    PYgX = total((u>t).*P)
    PYgX =  0.5081
    k = [600 700 750];
    px = zeros(1,3);
    py = zeros(1,3);
    for i = 1:3
        px(i) = (X>=k(i))*PX';
    end
    for i = 1:3
        py(i) = (Y>=k(i))*PY';
    end
    disp([px;py]')
        0.4131    0.2560
        0.2337    0.0784
        0.0818    0.0111

    Exercise \(\PageIndex{19}\)

    A residential College plans to raise money by selling “chances” on a board. There are two games:

    Game 1: Pay $5 to play; win $20 with probability \(p_1\) =0.05 (one in twenty)
    Game 2: Pay $10 to play; win $30 with probability \(p_2\) =0.2 (one in five)

    Thirty chances are sold on Game 1 and fifty chances are sold on Game 2. If \(X\) and \(Y\) are the profits on the respective games, then

    \(X = 30 \cdot 5 - 20N_1\) and \(Y = 50 \cdot 10 - 30 N_2\)

    where \(N_1, N_2\) are the numbers of winners on the respective games. It is reasonable to suppose \(N_1 ~\) binomial (30, 0.05) and \(N_2~\) binomial (50, 0.2). It is reasonable to suppose the pair \(\{N_1, N_2\}\) is independent, so that \(\{X, Y\}\) is independent. Determine the marginal distributions for \(X\) and \(Y\) then use icalc to obtain the joint distribution and the calculating matrices. The total profit for the College is \(Z = X + Y\). What is the probability the College will lose money? What is the probability the profit will be $400 or more, less than $200, between $200 and $450?

    Answer
    N1 = 0:30;
    PN1 = ibinom(30,0.05,0:30);
    x  = 150 - 20*N1;
    [X,PX] = csort(x,PN1);
    N2 = 0:50;
    PN2 = ibinom(50,0.2,0:50);
    y  = 500 - 30*N2;
    [Y,PY] = csort(y,PN2);
    icalc
    Enter row matrix of X-values  X
    Enter row matrix of Y-values  Y
    Enter X probabilities  PX
    Enter Y probabilities  PY
     Use array operations on matrices X, Y, PX, PY, t, u, and P
    G = t + u;
    Mlose = G < 0;
    Mm400  = G >= 400;
    Ml200  = G < 200;
    M200_450  = (G>=200)&(G<=450);
    Plose = total(Mlose.*P)
    Plose =   3.5249e-04
    Pm400 = total(Mm400.*P)
    Pm400 =   0.1957
    Pl200 = total(Ml200.*P)
    Pl200 =
        0.0828
    P200_450 = total(M200_450.*P)
    P200_450 =  0.8636

    Exercise \(\PageIndex{20}\)

    The class \(\{X, Y, Z\}\) of random variables is iid (independent, identically distributed) with common distribution

    \(X =\) [-5 -1 3 4 7] \(PX =\) 0.01 * [15 20 30 25 10]

    Let \(W = 3X - 4Y + 2Z\). Determine the distribution for \(W\) and from this determine \(P(W > 0)\) and \(P(-20 \le W \le 10)\). Do this with icalc, then repeat with icalc3 and compare results.

    Answer

    Since icalc uses \(X\) and \(PX\) in its output, we avoid a renaming problem by using \(x\) and \(px\) for data vectors \(X\) and \(PX\).

    x = [-5 -1 3 4 7];
    px = 0.01*[15 20 30 25 10];
    icalc
    Enter row matrix of X-values  3*x
    Enter row matrix of Y-values  -4*x
    Enter X probabilities  px
    Enter Y probabilities  px
     Use array operations on matrices X, Y, PX, PY, t, u, and P
    a = t + u;
    [V,PV] = csort(a,P);
    icalc
    Enter row matrix of X-values  V
    Enter row matrix of Y-values  2*x
    Enter X probabilities  PV
    Enter Y probabilities  px
     Use array operations on matrices X, Y, PX, PY, t, u, and P
    b = t + u;
    [W,PW] = csort(b,P);
    P1 = (W>0)*PW'
    P1 =  0.5300
    P2 = ((-20<=W)&(W<=10))*PW'
    P2 =  0.5514
    icalc3                           % Alternate using icalc3
    Enter row matrix of X-values  x
    Enter row matrix of Y-values  x
    Enter row matrix of Z-values  x
    Enter X probabilities  px
    Enter Y probabilities  px
    Enter Z probabilities  px
    Use array operations on matrices X, Y, Z,
    PX, PY, PZ, t, u, v, and P
    a = 3*t - 4*u + 2*v;
    [W,PW] = csort(a,P);
    P1 = (W>0)*PW'
    P1 = 0.5300
    P2 = ((-20<=W)&(W<=10))*PW'
    P2 = 0.5514

    Exercise \(\PageIndex{21}\)

    The class \(\{A, B, C, D, E, F\}\) is independent; the respective probabilities for these events are \(\{0.46, 0.27, 0.33, 0.47, 0.37, 0.41\}\). Consider the simple random variables

    \(X = 3I_A - 9I_B + 4I_C\), \(Y = -2I_D + 6I_E + 2I_F - 3\), and \(Z = 2X - 3Y\)

    Determine \(P(Y > X)\), \(P(Z > 0)\), \(P(5 \le Z \le 25)\).

    Answer
    cx = [3 -9 4 0];
    pmx = minprob(0.01*[42 27 33]);
    cy = [-2 6 2 -3];
    pmy = minprob(0.01*[47 37 41]);
    [X,PX] = canonicf(cx,pmx);
    [Y,PY] = canonicf(cy,pmy);
    icalc
    Enter row matrix of X-values  X
    Enter row matrix of Y-values  Y
    Enter X probabilities  PX
    Enter Y probabilities  PY
     Use array operations on matrices X, Y, PX, PY, t, u, and P
    G = 2*t - 3*u;
    [Z,PZ] = csort(G,P);
    PYgX = total((u>t).*P)
    PYgX =  0.3752
    PZpos = (Z>0)*PZ'
    PZpos = 0.5654
    P5Z25 = ((5<=Z)&(Z<=25))*PZ'
    P5Z25 = 0.4745

    Exercise \(\PageIndex{22}\)

    Two players, Ronald and Mike, throw a pair of dice 30 times each. What is the probability Mike throws more “sevens” than does Ronald?

    Answer

    P = (ibinom(30,1/6,0:29))*(cbinom(30,1/6,1:30))' = 0.4307

    Exercise \(\PageIndex{23}\)

    A class has fifteen boys and fifteen girls. They pair up and each tosses a coin 20 times. What is the probability that at least eight girls throw more heads than their partners?

    Answer
    pg = (ibinom(20,1/2,0:19))*(cbinom(20,1/2,1:20))'
    pg =  0.4373             % Probability each girl throws more
    P = cbinom(15,pg,8)
    P =   0.3100             % Probability eight or more girls throw more

    Exercise \(\PageIndex{24}\)

    Glenn makes five sales calls, with probabilities 0.37, 0.52, 0.48, 0.71, 0.63, of success on the respective calls. Margaret makes four sales calls with probabilities 0.77, 0.82, 0.75, 0.91, of success on the respective calls. Assume that all nine events form an independent class. If Glenn realizes a profit of $18.00 on each sale and Margaret earns $20.00 on each sale, what is the probability Margaret's gain is at least $10.00 more than Glenn's?

    Answer
    cg = [18*ones(1,5) 0];
    cm = [20*ones(1,4) 0];
    pmg = minprob(0.01*[37 52 48 71 63]);
    pmm = minprob(0.01*[77 82 75 91]);
    [G,PG] = canonicf(cg,pmg);
    [M,PM] = canonicf(cm,pmm);
    icalc
    Enter row matrix of X-values  G
    Enter row matrix of Y-values  M
    Enter X probabilities  PG
    Enter Y probabilities  PM
     Use array operations on matrices X, Y, PX, PY, t, u, and P
    H = u-t>=10;
    p1 = total(H.*P)
    p1 =  0.5197

    Exercise \(\PageIndex{25}\)

    Mike and Harry have a basketball shooting contest.

    • Mike shoots 10 ordinary free throws, worth two points each, with probability 0.75 of success on each shot.
    • Harry shoots 12 “three point” shots, with probability 0.40 of success on each shot.

    Let \(X, Y\) be the number of points scored by Mike and Harry, respectively. Determine \(P(X \ge 15)\), and \(P(Y \ge 15)\), \(P(X \ge Y)\).

    Answer
    X = 2*[0:10];
    PX = ibinom(10,0.75,0:10);
    Y = 3*[0:12];
    PY = ibinom(12,0.40,0:12);
    icalc
    Enter row matrix of X-values  X
    Enter row matrix of Y-values  Y
    Enter X probabilities  PX
    Enter Y probabilities  PY
     Use array operations on matrices X, Y, PX, PY, t, u, and P
    PX15 = (X>=15)*PX'
    PX15 = 0.5256
    PY15 = (Y>=15)*PY'
    PY15 = 0.5618
    G = t>=u;
    PG = total(G.*P)
    PG =   0.5811

    Exercise \(\PageIndex{26}\)

    Martha has the choice of two games.

    Game 1: Pay ten dollars for each “play.” If she wins, she receives $20, for a net gain of $10 on the play; otherwise, she loses her $10. The probability of a win is 1/2, so the game is “fair.”
    Game 2: Pay five dollars to play; receive $15 for a win. The probability of a win on any play is 1/3.

    Martha has $100 to bet. She is trying to decide whether to play Game 1 ten times or Game 2 twenty times. Let \(W1\) and \(W2\) be the respective net winnings (payoff minus fee to play).

    • Determine \(P(W2 \ge W1)\)
    • Compare the two games further by calculating \(P(W1 > 0)\) and \(P(W2 > 0)\)

    Which game seems preferable?

    Answer
    W1 = 20*[0:10] - 100;
    PW1 = ibinom(10,1/2,0:10);
    W2 = 15*[0:20] - 100;
    PW2 = ibinom(20,1/3,0:20);
    P1pos = (W1>0)*PW1'
    P1pos = 0.3770
    P2pos = (W2>0)*PW2'
    P2pos = 0.5207
    icalc
    Enter row matrix of X-values  W1
    Enter row matrix of Y-values  W2
    Enter X probabilities  PW1
    Enter Y probabilities  PW2
     Use array operations on matrices X, Y, PX, PY, t, u, and P
    G = u >= t;
    PG = total(G.*P)
    PG =  0.5182

    Exercise \(\PageIndex{27}\)

    Jim and Bill of the men's basketball team challenge women players Mary and Ellen to a free throw contest. Each takes five free throws. Make the usual independence assumptions. Jim, Bill, Mary, and Ellen have respective probabilities \(p =\) 0.82, 0.87, 0.80, and 0.85 of making each shot tried. What is the probability Mary and Ellen make a total number of free throws at least as great as the total made by the guys?

    Answer
    x = 0:5;
    PJ = ibinom(5,0.82,x);
    PB = ibinom(5,0.87,x);
    PM = ibinom(5,0.80,x);
    PE = ibinom(5,0.85,x);
     
    icalc
    Enter row matrix of X-values  x
    Enter row matrix of Y-values  x
    Enter X probabilities  PJ
    Enter Y probabilities  PB
     Use array operations on matrices X, Y, PX, PY, t, u, and P
    H = t+u;
    [Tm,Pm] = csort(H,P);
    icalc
    Enter row matrix of X-values  x
    Enter row matrix of Y-values  x
    Enter X probabilities  PM
    Enter Y probabilities  PE
     Use array operations on matrices X, Y, PX, PY, t, u, and P
    G = t+u;
    [Tw,Pw] = csort(G,P);
    icalc
    Enter row matrix of X-values  Tm
    Enter row matrix of Y-values  Tw
    Enter X probabilities  Pm
    Enter Y probabilities  Pw
     Use array operations on matrices X, Y, PX, PY, t, u, and P
    Gw = u>=t;
    PGw = total(Gw.*P)
    PGw = 0.5746
     
    icalc4               % Alternate using icalc4
    Enter row matrix of X-values  x
    Enter row matrix of Y-values  x
    Enter row matrix of Z-values  x
    Enter row matrix of W-values  x
    Enter X probabilities  PJ
    Enter Y probabilities  PB
    Enter Z probabilities  PM
    Enter W probabilities  PE
    Use array operations on matrices X, Y, Z,W
    PX, PY, PZ, PW t, u, v, w, and P
    H = v+w >= t+u;
    PH = total(H.*P)
    PH =  0.5746
    

    This page titled 9.2: Problems on Independent Classes of Random Variables is shared under a CC BY 3.0 license and was authored, remixed, and/or curated by Paul Pfeiffer via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.