knitr::opts_chunk$set(echo = TRUE)
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
leadcop <- read.csv("LEADCOPP.csv") t.test(leadcop$LEAD,conf.level = 0.99)
t.test(leadcop$COPPER, conf.level = .99)
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).
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)
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.
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)
the samples are independent and taken from populations that are approximately normally distributed
We can see that the mean of differences is never zero. Therefore, it seems clear that there is always some difference.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.