In: Statistics and Probability
A random sample of n1 = 10 regions in New England gave the following violent crime rates (per million population).
x1: New England Crime Rate
3.5 | 3.7 | 4.2 | 3.9 | 3.3 | 4.1 | 1.8 | 4.8 | 2.9 | 3.1 |
Another random sample of n2 = 12 regions in the Rocky Mountain states gave the following violent crime rates (per million population).
x2: Rocky Mountain Crime Rate
3.5 | 4.1 | 4.5 | 5.3 | 3.3 | 4.8 | 3.5 | 2.4 | 3.1 | 3.5 | 5.2 | 2.8 |
Assume that the crime rate distribution is approximately normal in both regions. Use a calculator to calculate x1, s1, x2, and s2. (Round your answers to two decimal places.)
1. Find S1
2. What is the value of the sample test statistic? Compute the corresponding z or t value as appropriate. (Test the difference μ1 − μ2. Do not use rounded values. Round your answer to three decimal places.)
Solution-1
use mean function in R studio to get mean and sd function in R to get the standard deviation
x1 <- c(3.5 ,3.7, 4.2,
3.9, 3.3, 4.1, 1.8,
4.8, 2.9, 3.1)
x1
length(x1)
x2 <- c(3.5 ,4.1, 4.5,
5.3, 3.3, 4.8, 3.5,
2.4 ,3.1, 3.5 ,5.2,
2.8)
length(x2)
mean(x1)
sd(x1)
mean(x2)
sd(x2)
Output:
length(x1)
[1] 10
> x2 <- c(3.5 ,4.1, 4.5,
5.3, 3.3, 4.8, 3.5,
2.4 ,3.1, 3.5 ,5.2,
2.8)
> length(x2)
[1] 12
> mean(x1)
[1] 3.53
> sd(x1)
[1] 0.8287206
> mean(x2)
[1] 3.833333
> sd(x2)
[1] 0.9413079
mean of x1=3.53
standard deviation of x1=s1=0.83
mean of x2=3.83
standard deviationof x2=s2=0.94
Solution-2:
test statistic
t=x1-x2/sqrt(s1^2/n1+s2^2/n2)
t=(3.53-3.833333)/sqrt(0.8287206^2/10+0.9413079^2/12)
t=-0.8035032
t=-0.804