Blackboard HW

  1. The probability density function should be the first derivative which would be:
    \[PDF = ae^{-ax}\] Expected Value = \[\frac{1}{a}\] Variance = \[\frac{1}{a^{2}}\] P(X<.5 | alpha =1):
x<- 0.5
a <- 1
P <- a * exp(-a*x)
round(P,3)
## [1] 0.607
  1. Variance = E(Y^2) b
    E(Y) = expected value = mean
    \[E(Y) = E(Y^{2}) = b\]

Word Doc HW

#x = 979
#mean = 1300
#standard deviation = sqrt(40000)
#lower.tail is false to get weight greater than 979
round(pnorm(979, 1300, sqrt(40000), lower.tail = FALSE), 4)
## [1] 0.9458
#Probability that a randomly selected steer is greater than 979lbs is 94.58%
#x=8340
#mean=11000
#sd = sqrt(1960000)
#lower.tail is false to get life span over 8340
round(pnorm(8340, 11000, sqrt(1960000), lower.tail = FALSE), 4)
## [1] 0.9713
#Probabilty that life span is over 8340 hours is 97.13%
#x=85 and 83
#mean=80
#sd = 3
round(pnorm(85, 80, 3) - pnorm(83, 80, 3), 4)
## [1] 0.1109
#Probability that firm will earn between $83M and $85M is 11.09%
#x= 1 - .14 = .86
#mean = 456
#sd = 123
round(qnorm(.86, 456, 123), 0)
## [1] 589
#Min score is 589
#x = .93 and .07
#mean = 6.13
#sd = 0.06
round(qnorm(.93, 6.13, .06), 2)
## [1] 6.22
round(qnorm(.07, 6.13, .06), 2)
## [1] 6.04
#Top 7%: 6.22cm Bottom 7%: 6.04cm
#x=.55 and .2
#mean = 78.8
#sd = 9.8
round(qnorm(.55, 78.8, 9.8))
## [1] 80
round(qnorm(.2, 78.8, 9.8))
## [1] 71
#Grades for C are between 71 and 80
#x=.55
#mean=21.2
#sd=5.4
round(qnorm(.55,21.2,5.4),1)
## [1] 21.9
#Min score is 21.9
round(pbinom(10, 151, .09), 4)
## [1] 0.192
#Probability is 19.2%
#mean = 48
#sd = 7
#n = 147
round(pnorm(48.83, 48, 7/sqrt(147), lower.tail = FALSE), 4)
## [1] 0.0753
#The probability that the mean of the sample would be greater than 48.83 months is 7.53%
#mean = 91
#sd = 10
#n = 68
round(pnorm(93.54, 91, 10/sqrt(68), lower.tail=FALSE), 4)
## [1] 0.0181
#The probability that the mean of a sample of 68 computers would be greater than 93.54 months is 1.81%
#Make functions for the Fisher Tansformation and Fisher SD
FisherTrans <- function(r) 
  {
  .5 * log((1+r)/(1-r))
  }
FisherSD <- function(n) 
  {
  1 / sqrt(n-3)
  }


p10 <- pnorm(FisherTrans(0.10), FisherTrans(0.07), FisherSD(540))
p4 <- pnorm(FisherTrans(0.04), FisherTrans(0.07), FisherSD(540))
round(p10 - p4,4)
## [1] 0.5153
#Probability = 51.53%
p27 <- pnorm(FisherTrans(.27), FisherTrans(.23), FisherSD(602), lower.tail = FALSE)
p19 <- pnorm(FisherTrans(.19), FisherTrans(.23), FisherSD(602))
round(p19 + p27, 4)
## [1] 0.301
#Probability = 30.1%
t <- abs(qt(.2/2, 208-1)) 
se <- .8/sqrt(208) 

lower <- round(.8 - t*se, 1)
upper <- round(.8 + t*se, 1)

lower
## [1] 0.7
upper
## [1] 0.9
t<- abs(qt(.02/2, 7472-1))
se <- 11/sqrt(7472)

lower <- round(16.6 - t*se, 1)
upper <- round(16.6 + t*se, 1)

lower
## [1] 16.3
upper
## [1] 16.9
  1. Step 1:
    The picture on the top right shows the problem.

Step 2:

t <- abs(qt(.05, 26-1)) 
round(t,4)
## [1] 1.7081
#t = 1.7081
  1. Step 1:
data <- c(383.6, 347.1, 371.9, 347.6, 325.8, 337)
mean(data)
## [1] 352.1667

Step 2:

sd <- round(sqrt(var(data)), 2)
sd
## [1] 21.68

Step 3:

n <- length(data)
t <- round(abs(qt(.10/2, n-1)),3)
t
## [1] 2.015

Step 4:

se <- sd/sqrt(n)
lower <- round(mean(data) - t*se, 2)
upper <- round(mean(data) + t*se, 2)
lower
## [1] 334.33
upper
## [1] 370
  1. Step 1:
#ci = .8
#N = 16
t <- abs(qt((1 - .8)/2, 16-1))
t
## [1] 1.340606

Step 2:

#mean=46.4
#sd=2.45
se <- 2.45/sqrt(16)
lower <- round(46.4 - t*se, 1)
upper <- round(46.4 + t*se, 1)
lower
## [1] 45.6
upper
## [1] 47.2
#mean = 8
sd <- 1.9
z <- 2.575 # 99% conf
n <- round(((z * sd)/0.13)^2)
n
## [1] 1416
#mean = 12.6
sd <- sqrt(3.61)
se <- 0.19
z <- 1.96 # 95% conf
n <- round((z * sd / se)^2,0)
n
## [1] 384
  1. Step 1:
n <- 2089 
p <- 1 - 1734/n
round(p, 3)
## [1] 0.17

Step 2:

z <- 2.33 #98% conf
se <- sqrt((p*(1-p)) / n)
lower <- round(p - z * se, 3)
upper <- round(p + z * se, 3)
lower
## [1] 0.151
upper
## [1] 0.189
  1. Step 1:
n <- 474 
p <- 156/n
round(p,3)
## [1] 0.329

Step 2:

z <- 1.96 #95% conf
se <- sqrt((p*(1-p)) / n)
lower <- round(p - z * se, 3)
upper <- round(p + z * se, 3)
lower
## [1] 0.287
upper
## [1] 0.371