HW1 Stat JeanPaul statistics

Embed Size (px)

Citation preview

  • 7/30/2019 HW1 Stat JeanPaul statistics

    1/9

    95-796 HOMEWORK 1

    Name:NIZEYIMANA Jean Paul

    Carnegie Mellon University in Rwanda

    Andrew ID:jnizeyim

    Course: Statistics for IT Managers

    1. a)

  • 7/30/2019 HW1 Stat JeanPaul statistics

    2/9

    Looking at the Histogram of volume, we can see that the distribution is positively skewed. Looking at the

    Box plot of volume, we can see that there is an outlier (Row 2: volume = 31415.9).

    b) Descriptive Statistics: Volume

    Variable N N* Mean SE Mean StDev Minimum Q1 Median Q3 Maximum

    Volume 30 0 11735 1340 7340 1616 7245 9027 16811 31416

    - Mean = 11735

    - Median = 9027

    - Standard deviation = 7340

    - Variance = the square of the standard deviation = 73402 = 53875600

    - Range = maximum minimum = 31416 1616 = 29800

    - Interquartile range = Q3 Q1 = 16811 7245 = 9566

    Based on these statistics, the hypothesis stated that the distribution is positively skewed is confirmed

    because the mean > median (11735 > 9027).

    c) Diameters of first six trees: 7, 11, 12, 16, 18, 20

    - Mean = (7+11+12+16+18+20) / 6 = 84 /6 = 14

    - Median = (12+16) /2 = 14

    - Standard deviation:

    Deviations: -7, -3, -2, 2, 4, 6

    Squared deviations: 49, 9, 4, 4, 16, 36

    Variance: S2 = (49+9+4+4+16+36) / (6-1) = 118/5 = 23.6

    Standard deviation: S = 6.23 = 4.86

    - Range = 20-7 = 13

    2. Conditional probability and Bayes rule

    We are given the following probabilities:

    P(use drugs) = 0.03 this means that P(dont use drugs) = 0.97

    P(positive | uses drugs) = 0.95 this means that P(negative | uses drugs) = 0.05

    P(positive | doesnt use drugs) = 0.2 this means that P(negative | doesnt use drugs) = 0.8

  • 7/30/2019 HW1 Stat JeanPaul statistics

    3/9

    Using Bayes rule:

    a) P(uses drugs | positive) =

    drugs)usetP(don'drugs)tdoesn'|P(positivedrugs)P(usedrugs)uses|P(positive

    drugs)P(usedrugs)uses|P(positive

    +

    =97.0*2.003.0*95.0

    03.0*95.0

    +

    = 0.0285 / 0.2225 = 0.128090

    b) P(uses drugs | negative) =

    drugs)usetP(don'drugs)tdoesn'|P(negativedrugs)P(usedrugs)uses|P(negative

    drugs)P(usedrugs)uses|P(negative

    +

    =97.0*8.003.0*05.0

    03.0*05.0

    +

    = 0.0015 / 0.7775 = 0.001929

    c) P(uses drug | A and B are positive) = P(uses drug | A is positive) * P(uses drug | B is positive)

    =drugs)usetP(don'drugs)tdoesn'|positiveisP(Adrugs)P(usedrugs)uses|positiveisP(A

    drugs)P(usedrugs)uses|positiveisP(A

    +*

    drugs)usetP(don'drugs)tdoesn'|positiveisP(Bdrugs)P(usedrugs)uses|positiveisP(B

    drugs)P(usedrugs)uses|positiveisP(B

    +

    =97.0*2.003.0*95.0

    03.0*95.0

    +

    *97.0*2.003.0*95.0

    03.0*95.0

    +

    = 0.128090* 0.128090= 0.0164070481

    d) P(B is positive | A is positive) = P(B is positive | use drugs) P(use drugs | A is positive) + P(B is

    positive | dont use drug) P (dont use drug | A is positive)

    =

    negative)isP(Bnegative)isB|drugsusetP(don'positive)isP(Bpositive)isB|drugsusetdon'P(

    positive)isP(Bpositive)isB|drugsusetdon'P(

    +

    * = 0.128090+

    negative)isP(Bnegative)isB|drugsP(usespositive)isP(Bpositive)isB|drugsusesP(

    positive)isP(Bpositive)isB|drugsusesP(

    +*

    0.87191

  • 7/30/2019 HW1 Stat JeanPaul statistics

    4/9

    =81.0*8.019.0*87191.0

    19.0*87191.0

    +

    * 0.128090 +81.0*05.019.0*128090.0

    19.0*128090.0

    +

    *0.87191

    = 0.2036 * 0.128090 + 0.3754 * 0.87191 = 0.3534

    3. Discrete and continuous random variables

    a)Manager 1:

    We have the interval [$5,000, $35,000]

    Mean: = ($5,000 + $ 35,000) / 2 = $ 20,000

    Standard deviation = ($35,000 - $ 5,000) / 12 = $8660.2540

    Manager 2:

    The mean and the standard deviation of his groups monthly expenses are the same as those estimated.

    Mean: = $21,000

    Standard deviation: =$2,000

    Manager 3:

    Mean: = )(xpx

    = 0.2($15,000) + 0.4($20,000) + 0.3($25,000) + 0.1($30,000) = $21500

    Variance: 2 = )()(2

    xpx

    = ((-6500)2 0.2 + (-1500)2 0.4 + (3500)2 0.3 + (8500)2 0.1)) = $20250000

    Standard deviation: = 2 = 20250000 = $4500

    b) Using Minitab, we can calculate these probabilities.

    The steps are:

    Select Calc > Probability Distributions > NormalSelect Cumulative Probability

    Fill-in the values in the dialog box (mean, standard deviation and the input constant)

    ClickOK

    Manager 1:

  • 7/30/2019 HW1 Stat JeanPaul statistics

    5/9

    i) From Minitab,

    Cumulative Distribution Function

    Normal with mean = 20000 and standard deviation = 8660.25

    x P( X

  • 7/30/2019 HW1 Stat JeanPaul statistics

    6/9

    22000 0.691462 (less than $22,000)

    Thus the probability that is greater than $22,000 will be 1- 0.691462 = 0.308538

    iii)Cumulative Distribution Function

    Normal with mean = 21000 and standard deviation = 2000

    x P( X

  • 7/30/2019 HW1 Stat JeanPaul statistics

    7/9

    Fill-in the values in the dialog box (mean, standard deviation and the input constant)

    ClickOK

    The input constant will be 20% = 0.2

    For manager 1:

    Inverse Cumulative Distribution Function

    Normal with mean = 20000 and standard deviation = 8660.25

    P( X

  • 7/30/2019 HW1 Stat JeanPaul statistics

    8/9

    Inverse Cumulative Distribution Function

    Normal with mean = 21000 and standard deviation = 2000

    P( X

  • 7/30/2019 HW1 Stat JeanPaul statistics

    9/9