knitr::opts_chunk$set(echo = TRUE)

Question 1

(a)

(b)

Used R to create a histogram

data <- read.csv("PHISHING.csv")
hist(data$INTTIME)
mean(data$INTTIME)

According to the histogram, and the fact that the means are very similar, data does appear to have exponential distribution with mean of 95

Question 2

(a) and (b)

Question 2

Question 3

Question 4

Question 5

Question 6

Question 7

Question 8

Question 9

Question 10

Question 11

Question 12

Question 13

Question 14

(a)

leadcop <- read.csv("LEADCOPP.csv")

t.test(leadcop$LEAD,conf.level = 0.99)

(b)

t.test(leadcop$COPPER, conf.level = .99)

(c)

We are confident that the lead levels in the water specimens are between (-1.15, 6.92). We are confident that the copper levels in the water specimens are between (0.1519, 0.6647).

(d)

99% confident means that it is 99% likely that the mean lead/copper levels in the water samples are between the given intervals in (c)

Question 15

solrad <- read.csv("SOLARAD.csv")
with(solrad, t.test(STJOS, IOWA, paired=TRUE, conf.level = 0.95))

Alternatively, we an use the formula

n = 7
d <- solrad$STJOS - solrad$IOWA
d_bar = mean(d)
s <- sd(d)

t_a_2 = qt(1-.05/2,n-1)
mp = c(-1,1)

d_bar + mp*t_a_2*s/sqrt(n)

And so we see the interval is (156.82, 239.18)

The interpretation is as follows: the mean of the differences between the measurements from the two sites will fall in the interval with a 95% confidence.

Question 16

(a)

diazinon <- read.csv("DIAZINON.csv")

with(diazinon, t.test(DAY, NIGHT, paired=TRUE, conf.level = 0.90))

We know 90% confidence interval that the mean diazinon levels differ from day to night is (-58.9, -18.92)

(b)

the samples are independent and taken from populations that are approximately normally distributed

(c)

We can see that the mean of differences is never zero. Therefore, it seems clear that there is always some difference.



agracy2246/MATH4753grac0009 documentation built on April 26, 2020, 9:39 a.m.