## 1. Complete problem #31 on page 163 (business venture).

You are involved in a venture.

Option 1: Loses $8000, x1= -8000 Option 2: Loses $0, x2= 0 Option 3: Makes $10000, x3=10000

To figure out the probabilities, just write out the fact that x1 is .5x2 and x3 is .3x2. Since this is a probability distribution function, the probabilities must sum to one.

.5x2 + x2 + .333x2 = 1= (11/6)x2 = x2=6/11 x2 = .545454 x1 = .272727 x3=.181818

We can then write out our probability mass function (PMF).

```
x = c(-8000,0, 10000)
px=c(6/22, 6/11, 6/33)
#verify pmf
sum(px) #equals 1
```

`## [1] 1`

```
#calculate EX
EX=sum(x*px)
EX #-363.6364
```

`## [1] -363.6364`

```
#Calculate Var(X)
VarX=sum(px*(x-EX)^2) #35504132
VarX
```

`## [1] 35504132`

```
#Calculate SD(X)
SDX=sqrt(VarX) # $5,958.534
```

## 3. The rate of medication errors across the United States is 2 per 1000 orders. (Volume). A sample from your local hospital finds 5 errors in a sample of 2000. What is the probability that this hospital is within the US standard? In other words, what is the probability of having 5 or more errors in such a sample size if the hospital is operating at the national rate?

```
#Binomial, P(R>=5 | N = 2000, pi = 2/1000)
n2=2000
pi2=2/1000
PR=1-pbinom(4,n2, pi2)
ER=n2*pi2
VR=n2*pi2*(1-pi2)
#Poisson, P(S>=5 | lambda x t = 4)
lambdat=4
PS=1-ppois(4,lambdat)
ES=lambdat
VS=ES
mylist2=c(PR, ER, VR, PS, ES, VS)
names(mylist2)=c("P(R)", "E(R)", "V(R)", "P(S)", "E(S)", "V(S)")
mylist2
```

```
## P(R) E(R) V(R) P(S) E(S) V(S)
## 0.3711630 4.0000000 3.9920000 0.3711631 4.0000000 4.0000000
```

## Complete problem #41 on page 212 (industrial accidents).

The annual number of industrial accidents occurring in a particular manufacturing plant is known to follow a Poisson distribution with mean 12.

```
#P(X=12 | Lambda = 12)
PXEQ12=dpois(12, 12)
#P(X<=12 | ...)
PXLTE12 = ppois(12,12)
#P(X>=15 | ...)
PXGTE15=1-ppois(14,12)
#P(10<=X<=15 | ...)
PRange=ppois(15, 12)-ppois(9,12)
#P(X<=k)=.99
Q=qpois(.99,12)
mylist3=c(PXEQ12, PXLTE12, PXGTE15, PRange, Q)
names(mylist3)=c("P(X=12)", "P(X<=12)", "P(X>=15)", "P(10<=X=15)", "P(X<=k)=.99")
mylist3
```

```
## P(X=12) P(X<=12) P(X>=15) P(10<=X=15) P(X<=k)=.99
## 0.1143679 0.5759652 0.2279755 0.6020235 21.0000000
```