Question

In: Statistics and Probability

2.) You want to determine if the average height of men in California is greater than...

2.) You want to determine if the average height of men in California is greater than the average height of men in Nebraska. You take a random sample of 30 men in California and 30 men in Nebraska. The data below represents the heights of the men in inches. Write the R code that does the following:

H0: Difference in means in populations is zero.

Ha: Difference in means in the populations is not zero.

NE_heights<-c( 73.5, 68.5, 70, 63, 64, 65, 64, 70, 61, 61.25, 69, 73, 69, 66, 69.5, 68,

64, 64, 72.5, 69, 67, 63, 66.5, 70.5, 64, 67, 71, 74, 68, 65)

CA_heights <- c( 72, 73.5, 74, 75, 66, 78, 70, 73, 74, 68, 71, 68, 67, 66, 73, 72, 82, 71, 64, 72, 65, 66, 69, 83, 67, 74, 76, 65, 74, 79)

  

a.) Makes two boxplots, an orange one for the CA_heights data, and a red one for the NE_heights data which labels the main title "Men’s heights California vs Nebraska" and names the CA_heights data as "CA heights" and the NE_heights data as "NE heights".

b.) Computes the, sample size, mean and standard deviation of both CA_heights and NE_heights data.

c.) Performs an unpaired "less" than t-test with =.02 to decide whether there is a statistically significant difference between men’s heights in California and Nebraska.

d.) Paste your R code into Run R Script and run the script.

e.) Paste the R output to the bottom R code.

f.) Looking at the p-value in the R output, decide if there is evidence to suggest that there is a statistically significant difference between men’s heights in California and Nebraska.

Write the p-value and your conclusion at the top of your R code.

Solutions

Expert Solution

> NE_heights<-c( 73.5, 68.5, 70, 63, 64, 65, 64, 70, 61, 61.25, 69, 73, 69, 66, 69.5, 68,64,64,72.5,69,67,63,66.5,70.5,64,67,71,74,68,65)
> CA_heights <- c( 72, 73.5, 74, 75, 66, 78, 70, 73, 74, 68, 71, 68, 67, 66, 73, 72, 82, 71, 64, 72, 65, 66, 69, 83, 67, 74, 76, 65, 74, 79)
> dataframe=data.frame(NE_heights,CA_heights)
> colnames(dataframe)=c("NE_heights","CA_heights")
> boxplot(dataframe,horizontal=FALSE,las=1,notch=FALSE,outline=TRUE,outcol="orange",outpch=19, col="Green",xlab="City",ylab="Height", main="Boxplot",sub="",col.lab="Green",col.main="yellow",col.sub="white",col.axis="red",cex.lab=1,cex.main=1,cex.sub=1,cex.axis=1)

> sample_size_n1=length(NE_heights)
> sample_size_n1
[1] 30
> sample_size_n2=length(CA_heights)
> sample_size_n2
[1] 30
> m1=mean(NE_heights)
> m1
[1] 67.34167
> m2=mean(CA_heights)
> m2
[1] 71.58333
> std_dev_1=sqrt(var(NE_heights))
> std_dev_1
[1] 3.610619
> std_dev_2=sqrt(var(CA_heights))
> std_dev_2
[1] 4.958593

> t.test(NE_heights,CA_heights,var.equal=T,,level=0.98)

   Two Sample t-test

data: NE_heights and CA_heights
t = -3.7876, df = 58, p-value = 0.0001818
alternative hypothesis: true difference in means is less than 0
95 percent confidence interval:
-Inf -2.369721
sample estimates:
mean of x mean of y
67.34167 71.58333

conclusion: Here pvalue is less than 2% level of signficance, ie. pvalue=0.0001818<0.02, we may reject null hypothesis at 2% level of significance and conclude that the There is sufficient evidence that the statistically significant difference between men’s heights in California and Nebraska.


Related Solutions

You want to determine if the lengths of roller coasters in California is different than those...
You want to determine if the lengths of roller coasters in California is different than those in Texas. Below is data that compares two samples of roller coaster in California and Texas. CA Roller Coasters TX Roller Coasters Number with a Length > 500 meters 20 12 Number in Sample 30 25 Test the hypothesis that the proportion of CA roller coasters that are longer than 500 meters is different than the proportion of TX roller coasters that are longer...
5) The average height of women is ̄y = 64.5 inches, the average height of men...
5) The average height of women is ̄y = 64.5 inches, the average height of men is ̄y = 67.5 inches. For both the standard deviation is about s = 3 inches. (a) Suppose you take a sample of 4 women and 4 men. Construct a 95% CI for both. Do the confidence intervals overlap? (b) Now repeat using a sample of 225 men and 225 women. Do the confidence intervals overlap? (c) Can you explain what happened? Why is...
Suppose you want to determine the average height of college basketball players in NCAA Division I....
Suppose you want to determine the average height of college basketball players in NCAA Division I. In a random sample of 9 players, the sample average is 70.725 inches with a standard deviation of 4.4081 inches. What is the 95% confidence interval for the average height of all NCAA D-I players? Question 6 options: 1) ( 67.401 , 74.049 ) 2) ( 69.256 , 72.194 ) 3) ( 67.337 , 74.113 ) 4) ( -67.337 , 74.113 ) 5) (...
Determine if there is sufficient evidence to conclude the average amount of divorces is greater than...
Determine if there is sufficient evidence to conclude the average amount of divorces is greater than or equal to 3000 in the United States and territories at the 0.05 level of significance N=52. Clearly state a null and alternative hypothesis Give the value of the test statistic Report the P-Value Clearly state your conclusion (Reject the Null or Fail to Reject the Null) Explain what your conclusion means in context of the data. Summary Table for Divorces Mean 1,399 Median...
A researcher posits that height is associated with greater income among men. To test this, he...
A researcher posits that height is associated with greater income among men. To test this, he records the height (in inches) and income (in thousands of dollars per year) in a random sample of 10 men. Compute Pearson correlation coefficient for the data listed in the following table. X (Height) Y (Income) 66 18 70 42 74 52 62 19 68 22 78 40 80 29 72 42 70 38 76 44                           Pearson r             _______ Add 3 inches to...
Are older men shorter than younger men? According to a national report, the mean height for...
Are older men shorter than younger men? According to a national report, the mean height for U.S. men is 69.4 inches. In a sample of 119 men between the ages between of 60 and 69 and, the mean height was 69.3 inches. Public health officials want to determine whether the mean height for older men is less than the mean height of all adult men. Assume the population standard deviation to be 2.58. Use the a=0.05 level of significance and...
T-Test A research team measured 70 American men’s height. The average height of these men is...
T-Test A research team measured 70 American men’s height. The average height of these men is 176cm and the sample variance is 16. Is the average height of American males different from 174cm? a) State the null and alternative hypotheses b) Compute the t-statistics c) Draw the statistical conclusion (at 95% confidence level)
Question 2: You want to determine if there are any Kuiper Belt objects larger than Eris....
Question 2: You want to determine if there are any Kuiper Belt objects larger than Eris. Part a: Describe the observational methods and analysis you would apply to search for them. Part b: How might you determine if any candidate objects are larger than Eris? What observational data do you need for an object to estimate its radius?
If the price was slightly less than average total cost, but still greater than average variable...
If the price was slightly less than average total cost, but still greater than average variable cost, then the profit-maximizing, monopolistically competitive firm would Answer choices: produce an output amount that corresponded to the place where marginal cost equals marginal revenue and break even. produce an output amount where marginal cost equals marginal revenue and make a small profit. continue to produce an output amount that corresponded to the place where marginal cost equals marginal revenue, but make a small...
4. Another doctor claims that the mean height of 2-year-old boys is greater than 34 inches....
4. Another doctor claims that the mean height of 2-year-old boys is greater than 34 inches. A random sample of 320 2-year-old boys revealed that their mean height is 33.8 inches. Knowing that the standard deviation of all 2-year-old boys is 1.44 inches, test the doctor’s claim at the 10% level of significance.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT