Question

In: Statistics and Probability

(a) Using the armspanSpring2020.csv data from class, test the hypothesis that those who identify as female...

(a) Using the armspanSpring2020.csv data from class, test the hypothesis that those who identify as female have a shorter armspan than those who do not so identify. Write out the null and alternative hypotheses, give the value of the test statistic and the p-value, and state your conclusion using a 5% significance level. Use R for all computations.

(b) Interpret, in your own words, the meaning of the p-value you got in part (a).

(c) Find a 95% confidence interval for the mean armspan using the data in armspanSpring2020.csv. Use R.
(d) What assumptions must you make if we wish to interpret this interval to apply to all UCLA students? Which of these assumptions do you think are met adn which are not?
(e) Find a 95% confidence interval for the difference between mean armspan and mean heights. Does it contain 0? Why is this surprising or not-surprising?

height armspan is.female
67 NA 1
70 40 0
64 67 1
71 70 0
72 49 0
62 61 1
72 74 0
71 68 0
63 60 1
69 69 0
67 68 1
63 63 1
60 60 1
66 66 0
61 61 1
69 68 0
65 65 1
72 72 0
70 70 0
73 77 0
65 61 1
68 72 1
62 55 NA
71 74 0
72 70 0
66 22 1
65 67 1
64 62 0
65 62 1
73 69 0
67 77 0
60 62 1
70 59 0
68 66 1
65 65 1
72 69 0
62 52 1
69 66 0
68 67 0
65 66 1
65 64 0
66 65 1
62 52 1
64 62 1
66 65 1
69 69 0
64 65 1
70 74 0
65 69 0
70 80 0
63 NA 1
67 70 1
64 64 1
64 62 1
6 5.7 0
67 67 1
72 71 0
73 75 0
68 68 0
67 63 1
66 67 1
67 36 0
68 72 0
73 70 0
70 70 0
70 72 0
60 58 0
70 68 0
62 63 0
68 68 1
67 67 NA
68 71 0
65 48 1
70 76 0
69 70 0
69 66 0
58 55 NA
64 64 0

Please help with the r codes especially. It is my first time using it and I'm having a hard time. Thanks!

Solutions

Expert Solution


data <- read.table("../Documents/Tutoring/Software/random data/armspanSpring2020.csv",header =T)
#a
female_arm <- data[which(data$is.female==1& data$armspan != "NA"),"armspan"]
male_arm <- data[which(data$is.female==0 & data$armspan != "NA"),"armspan"]
t.test(female_arm,male_arm,alternative="less")

#c
t.test(data$armspan)

Ho : mu_female = mu_male
Ha: mu_female < mu_male

TS = -1.5743
p-value = 0.05993

p-value > alpha (0.05)
hence we fail to reject the null hypothesis

b)
p-value is 0.05993
it means the probability of getting more extreme than this sample is 0.05993 when means are equal

c)
95% confidence interval is (61.38928,66.57651)


Related Solutions

Using the data from the csv file, answer the questions with rstudio # number_children - The...
Using the data from the csv file, answer the questions with rstudio # number_children - The number of children in the home # internet - Does the home have internet access? # mode - The way the household took the survey # own - Do the residents own with or without a mortgage or rent? # language - The primary language spoken in the home # decade_built - The decade the home was built 1) In how many households, wife’s...
Test a hypothesis using variables in the data set for which ANOVA is the appropriate test...
Test a hypothesis using variables in the data set for which ANOVA is the appropriate test (do NOT use the variables assigned for the final project). Data: Gender abuse female 7.00    female .00 female 7.00 male 7.00 male .00 male 7.00 female 7.00 female 7.00 female .00 female .00 State the null and research hypotheses in statistical terms, including the appropriate notation. Explain why ANOVA is the appropriate test. In your explanation, describe the formula (13.1) for the statistic...
Suppose that a​ researcher, using data on class size ​(CS​) and average test scores from 100...
Suppose that a​ researcher, using data on class size ​(CS​) and average test scores from 100 ​third-grade classes, estimates the OLS regression. TestScore = 515.1960 + (-5.7618) x CS, R^2 = 0.11, SER = 11.4 (20.1960) (2.3426) 1. The p-value for the two-sided test for the null hypothesis H0 : B1 = 0 is ? (Round to four decimal places) 2. The p-value for the two-sided test of the null hypothesis H0 : B1 = -5.5 ? (Round to four...
*Using the am column of the mtcars data, test the hypothesis that the true proportion of...
*Using the am column of the mtcars data, test the hypothesis that the true proportion of automatic cars is .62 at the .01 significance level. Please not that am = 0 stands for automatic, while am = 1 stands for manual.* Please make sure you solve in R-studio. Solving without giving me R-codes will not help me. It would also help if you write a brief explanation of what you did. Thanks in advance!
*Using the mpg column in the mtcars data conduct a hypothesis test to see if the...
*Using the mpg column in the mtcars data conduct a hypothesis test to see if the true mean miles per gallon of cars is greater than 22. Use an alpha level of .1* Please make sure you solve in R-studio. Solving without giving me R-codes will not help me. It would also help if you write a brief explanation of what you did. Thanks in advance!
Using the data below, test the null hypothesis that the variance in the Close Ratio for...
Using the data below, test the null hypothesis that the variance in the Close Ratio for the sample of employees is at most 1.5% at 5% significance level. Years Employed Gender Certified Prior Background Close Ratio Sales 7 M Y Y 44.40% $   201,500 8 M Y Y 54.20% $   129,000 4 M Y Y 60.70% $   101,100 8 M N N 42.60% $      99,700 6 M Y N 68.30% $      98,100 6 M N N 37.90% $      93,900 2 M N N 29.50% $      90,800 2...
1-A) Identify the P-VALUE in a hypothesis test of the following claim and sample data: Claim:...
1-A) Identify the P-VALUE in a hypothesis test of the following claim and sample data: Claim: “The average weekly number of hours spent studying by students who sit in the front of the classroom is greater than that of students who sit in the back of the classroom.” Dozens of randomly selected students were asked how many hours they study per week. There were 35 students who said that they tend to sit toward the front of the classroom, and...
When using the import wizard in MATLAB to import data fro, a .csv file the data...
When using the import wizard in MATLAB to import data fro, a .csv file the data appears in MATLAB in the following format "35:53.2" how do I convert this into more usable matlab values? I think that the duration function was used to generate the time format. The code will need to be written in MATLAB software I will leave feedback if you are able to provide a correct response. Thank you
Using the Sample Hypothesis Test Data and Chi-Square Data with a .05 level of significance, provide...
Using the Sample Hypothesis Test Data and Chi-Square Data with a .05 level of significance, provide a summary report for the Vice President including the following information in an essay with a minimum of 500 words: Two-Sample Hypothesis Test: Discuss the hypothesis test assumptions and test used. Provide the test statistic and p-value in your response. Evaluate the results of the hypothesis test with the scenario. Provide recommendations for the Vice President. Chi-square Hypothesis Test: Discuss the hypothesis test assumptions...
Using the Sample Hypothesis Test Data and Chi-Square Data with a .05 level of significance, provide...
Using the Sample Hypothesis Test Data and Chi-Square Data with a .05 level of significance, provide a summary report for the Vice President including the following information: Two-Sample Hypothesis Test: Discuss the hypothesis test assumptions and test used. Provide the test statistic and p-value in your response. Evaluate the results of the hypothesis test with the scenario. Provide recommendations for the Vice President. Chi-square Hypothesis Test: Discuss the hypothesis test assumptions and test used. Provide the test statistic and p-value...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT