Acid Rain in Shenandoah National Park

  1. α=0.01.
  2. HA:μ<5.6 and H0:μ=5.6, where μ is the mean pH for all rainwater collections at the Big Meadows Station in the Shenandoah National Park, VA.
  3. A one-sample t-test is required because quantitative variable (pH) was measured on individuals from one group or population (all rainwater collections at Big Meadows Station), σ is UNknown, and the population mean is being compared to a specific value in the hull hypothesis.
  4. An observational study (naturally occurring rainwater was collected; the researcher’s did not create any treatment) without obvious randomization was used.
  5. The assumptions are met because σ is unknown and n=90≥40. Thus, the sampling distribution of the test statistic should follow a t-distribution.
  6. The statistic is x̄=4.578.
  7. The test statistic is t=-33.530 with 89 df.
  8. The p-value is <0.00005.
  9. The H0 is rejected because the p-value<α.
  10. The mean pH appears to be significantly lower than 5.6 and, thus, indicates acid rain at this site.
  11. One is 99% confident that the mean pH level is less than 4.65, which further indicates acid rain at this site.

R Code and Results

> d <- read.csv("pHlevels.csv")
> ( ph.t <- t.test(ph$pH,mu=5.6,alt="less",conf.level=0.99) )
One Sample t-test with ph$pH 
t = -33.5303, df = 89, p-value < 2.2e-16
alternative hypothesis: true mean is less than 5.6 
99 percent confidence interval:
     -Inf 4.650103 
sample estimates:
mean of x 
 4.577889 



Delivering Military Supplies

  1. α = 0.05
  2. HA: μbg < 0 and H0: μbg = 0, where μ is the mean time to deliver ALL shipments, b is for Bosnia, and g is for Persian Gulf War. [Note that with this subtraction that the HA represents the mean delivery time being less for Bosnia (the new system) than Persian Gulf.]
  3. 2-sample t-test because (i) two groups/populations are considered (Bosnia and Persian Gulf), (ii) a quantitative variable (delivery time) was recorded, and (iii) the individuals in the groups are independent (the deliveries in the two wars cannot be connected because the wars are separated in time and space and at the time of the Persian Gulf war it was not possible to know there would be a Bosnian war).
  4. An observational study without clear randomization of the two samples.
  5. The assumptions are met because (i) the samples are independent (as described above), (ii) nb+ng = 9+9 = 18 > 15 and the two sample distributions (see histograms below) are not obviously strongly skewed (also told to assume that the distributions are not strongly skewed), and (iii) the variances appear to be equal (Levene’s p-value = 0.0736 > α).
  6. b-x̄g = 7.16-25.24 = -18.09.
  7. The test statistic is t = -4.846 with 16 df.
  8. The p-value = 0.0001.
  9. The H0 is rejected because the p-value < α.
  10. The mean delivery time was significantly lower in Bosnia than in the Persian Gulf War. Thus, the new “just-in-time” mentality for deliveries appears to have resulted in quicker delivery times.
  11. I am 95% confident that the mean delivery time for Bosnia was at least 11.6 days faster than for the Persian Gulf War. This further supports that the mean delivery time was faster with the new system.

R Code and Results

> del <- read.csv("deliveries.csv")
> ggplot(data=del,mapping=aes(x=time)) +
    geom_histogram(binwidth=5,boundary=0,color="black",fill="lightgray") +
    labs(x="Time for Delivery",y="Frequency of Deliveries") +
    scale_y_continuous(expand=expansion(mult=c(0,0.05))) +
    theme_NCStats() +
    facet_wrap(vars(war))

> (del.lev <- levenesTest(time~war,data=del) )
Levene's Test for Homogeneity of Variance (center = median)
      Df F value Pr(>F)
group  1  3.6657 0.0736
      16               
> ( del.t <- t.test(time~war,data=del,var.equal=TRUE,alt="less") ) # mu=0 is a default
 Two Sample t-test with time by war 
t = -4.8458, df = 16, p-value = 8.942e-05
alternative hypothesis: true difference in means between group Bosnia and group Gulf is less than 0 
95 percent confidence interval:
      -Inf -11.57169 
sample estimates:
mean in group Bosnia   mean in group Gulf 
            7.155556            25.244444