Question

Using ToothGrowth Data in R (data found using R program by library(datasets) -> data("ToothGrowth") ), Assume...

Using ToothGrowth Data in R (data found using R program by library(datasets) -> data("ToothGrowth") ),

Assume that if “len” is above 20, it is classified as “HIGH”; and ”LOW”, otherwise. Ignore ‘dose’, and determine whether there is a significant difference in the proportions of the two groups classified as “HIGH” using a suitable test and a 95% confidence interval

Homework Answers

Answer #1

Load library.

Then load dataset.
Apply condition using ifelse condition.

Entire R code is

library(datasets)
data("ToothGrowth")
print(ToothGrowth)
ToothGrowth$len <- ifelse( ToothGrowth$len > 20, c("HIGH"), c("LOW"))

library(dplyr)
ToothGrowth <- select(ToothGrowth, -dose)
print(ToothGrowth)
table(ToothGrowth$len,ToothGrowth$supp)
prop.test( table(ToothGrowth$len,ToothGrowth$supp) , correct=FALSE)

Output:

2-sample test for equality of proportions without continuity correction

data: table(ToothGrowth$len, ToothGrowth$supp)
X-squared = 4.2857, df = 1, p-value = 0.03843
alternative hypothesis: two.sided
95 percent confidence interval:
0.02365533 0.51205896
sample estimates:
prop 1 prop 2
0.6428571 0.3750000

Here p=0.03843

p<0.05 Reject Null hypothesis.

Accept alternative hypothesis that there exists a differrence in proportions.

there is a significant difference in the proportions of the two groups classified as “HIGH” and LOW.

95% confidence interval for difference in proportons lies in between 0.0237 and 0.5121

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Consider the ToothGrowth data in R, concerning the Effect of Vitamin C on Tooth Growth in...
Consider the ToothGrowth data in R, concerning the Effect of Vitamin C on Tooth Growth in Guinea Pigs. : 1.Ignore ‘dose’ and determine whether there is a significant difference in the mean “len” between the two groups (i.e., OJ vs VC): a)A parametric procedure b)A non-parametric procedure Discuss the assumption underlying each of the analyses, their validity, and any remedial measures to be taken.
<<Using R exercise>> Q. Consider the data in anorexia in the MASS library. Find a 98%...
<<Using R exercise>> Q. Consider the data in anorexia in the MASS library. Find a 98% confidence interval for the variable Prewt and Postwt.
This problem is from the "Using R for Introductory Statistics" by John Verzani. Problem 9.22: In...
This problem is from the "Using R for Introductory Statistics" by John Verzani. Problem 9.22: In the year 2001, a poll of 600 people found that 250 supported gay marriage. A 2013 poll of 1,050 found 52% in support. Do a test of significance to see whether the difference in proportions is statistically significant.
Immediately after a ban on using hand-held cell phones while driving was implemented, compliance with the...
Immediately after a ban on using hand-held cell phones while driving was implemented, compliance with the law was measured. A random sample of 1,250 drivers found that 98.9% were in compliance. A year after the implementation, compliance was again measured to see if compliance was the same (or not) as previously measured. A different random sample of 1,100 drivers found 96.9% compliance. a.State an appropriate null and alternative hypothesis for testing whether or not there is any statistical difference (i.e.,...
A researcher measured the body temperature of a random sample of 64 adults and found the...
A researcher measured the body temperature of a random sample of 64 adults and found the mean and standard deviation to be 36.83oC and 0.38oC, respectively. A temperature of 37.0°C is assumed to be “normal”. Do these data suggest otherwise? a. Provide an answer using a test of hypothesis. b. Provide an answer using a 95% confidence interval. c. Briefly explain the difference between part (a) and part (b).
Using data from a random sample of 436 Springfield residents, a criminologist found that 63 percent...
Using data from a random sample of 436 Springfield residents, a criminologist found that 63 percent of them oppose funding cuts for the city police department. Calculate a 95% confidence interval. Calculate the 99% confidence interval
Suppose the data in the table below was found from a case-control study. What measure of...
Suppose the data in the table below was found from a case-control study. What measure of association would you calculate, what is the value of the measure and it's 95% CI? Is it significant?  Why or why not? case control exposed 37 77 non-exposed 120 390 a RR, 1.38, (1.01, 1.88), significant since 0 is not contained in the confidence interval b OR, 1.56, (1.00, 2.43), significant since 0 is not contained in the confidence interval c RR, 1.38, (1.01, 1.88),...
Data for this analysis was collected over many years of class. You can assume that this...
Data for this analysis was collected over many years of class. You can assume that this data represents samples selected from larger groups of students. Students in a business statistics class were asked to agree/disagree with the following statement at the end of the class: "I really enjoyed this class." A study was conducted to determine if a difference existed between the responses of students in two different teaching methods used - traditional live teaching and online teaching. The Statistix...
A sample of 19 paired observations generates the following data: d = 1.2 and s2DsD2 =...
A sample of 19 paired observations generates the following data: d = 1.2 and s2DsD2 = 2.4. Assume a normal distribution. a. Construct the 95% confidence interval for the mean difference μD. (Round intermediate calculations to at least 4 decimal places and final answers to 2 decimal places.) Confidence interval is_________to__________. b. Using the confidence interval, test whether the mean difference differs from zero. There is evidence that the mean difference differs from zero. There is no evidence that the...
Using SPSS, the outcome of the data analysis are as follow; Paired Differences 95% Confidence Interval...
Using SPSS, the outcome of the data analysis are as follow; Paired Differences 95% Confidence Interval of the difference Mean Std. Deviation Std. Error Mean Lower Upper T df Sig.(2-tailed) Pair 1 Method A-Method B 5.200 6.125 1.937 0.819 9.581 2.685 9 1-Provide a statement about the finding in this table for paired t-test and it is interpretation? 2-Report the estimate difference for ua-ub between the mean scores obtained by children taught by the two methods and its 95% confidence...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT