title: "Hypothesis Testing Project"
authors: "Ellie Murphy, Emma Lipsky-Portales, Rohan Parikh, Ben  Frankstein"
date: "2022-11-22"
output: html_document

Introduction:

We wanted to compare the death rates in Virginia between rural and urban communities in the year 1940. Although the data is older, it still acts as a historical reference point for comparing death rates between the two types of communities. We used the “VADeaths” dataset that is in R. We are using hypothesis testing to see see if the mean death rate in urban communities is greater than or not greater than the rural mean death rate. This will be a right tailed test, and the level of significance will be .05.

Ho : mu = 32.75, Ha: mu > 32.75

# Checking Normality Distrubution
par(mfrow=c(1,2))
boxplot(VADeaths,horizontal=TRUE)
qqnorm(VADeaths[,3],datax=TRUE,main="Normality plot of Deaths Urban Males")

# Finding the t value and the p value
t.test(VADeaths[,3],mu=32.75,alternative=("greater"))
## 
##  One Sample t-test
## 
## data:  VADeaths[, 3]
## t = 0.76541, df = 4, p-value = 0.2433
## alternative hypothesis: true mean is greater than 32.75
## 95 percent confidence interval:
##  18.9501     Inf
## sample estimates:
## mean of x 
##     40.48

Conclusion:

Since the p-value is greater than alpha, we do not reject the null.

Therefore, we can conclude that the number of urban deaths is not greater than the number of rural deaths with 95% confidence.