Question

In: Statistics and Probability

In R, Use library(MASS) to access the data sets for this test. Use the Pima.tr data...

In R, Use library(MASS) to access the data sets for this test. Use the Pima.tr data set to answer questions 1-5.

  1. What is the average age for women in this data set?

  2. What is the maximum number of pregnancies for women in this data set ?

  3. What is the median age for women who have diabetes?

  4. What is the median age for women who do not have diabetes?

  5. What is the third quartile of the skin variable?

Solutions

Expert Solution

So, Average age = 32.11 years

MAx number of pregnancies = 14

3rd quartile for skin variable = 36

Median Age for women having diabates = 36

Median age for women not having diabates = 26

R code :

# loading data library(MASS) d<- Pima.tr summary(d) # Women havibg diabates : "Yes" Yes <- d[d$type=="Yes",] summary(Yes$age) #Women not having Diabates : "No No <- d[d$type=="No",] summary(No$age) 

Related Solutions

using the mtcars data set data(mtcars) USE data in mtcars library in R 5.Use k means...
using the mtcars data set data(mtcars) USE data in mtcars library in R 5.Use k means cluster analysis. 6. Get cluster means. 7. Visualize the clustering result.
load the MASS library in R. A. Package ‘MASS’ which provides a description of the datasets...
load the MASS library in R. A. Package ‘MASS’ which provides a description of the datasets available in the MASS package. Then, answer each of the following questions using the appropriate test statistic and following formal steps of hypothesis testing. A:Test of equal or given proportions: Use the “bacteria” data set to answer the question, “did the drug treatment have a significant effect of the presence of the bacteria compared with the placebo?” B: F-test: Use the “cats” data set...
If we have data sets in my computer .. How to use them in Microsoft R...
If we have data sets in my computer .. How to use them in Microsoft R without writing them? I know the code : data<- read.csv("c:\\data.csv",header =True) but I didn't know how to use it ..Can u explain that with take screenshot from your work..Thanks
Go into R and view all of the data sets preloaded in R by using the...
Go into R and view all of the data sets preloaded in R by using the data() command. As you see there are quite a few data sets loaded into R. Now retrieve the dataset women using data(women). This data is from a random sample of 15 women, recording the height and weight of each woman in the sample. I want you to create a 95% confidence interval for the population mean using this data and R. First find the...
Compute the sample correlation coefficient r for each of the following data sets. (Use 3 decimal...
Compute the sample correlation coefficient r for each of the following data sets. (Use 3 decimal places.) (a) x 5 8 9 y 2 2 5 (b) x 2 2 5 y 5 8 9 r(a) = r(b) = x 2 1 2 4 3 y 5 10 9 15 10 (a) Find the linear correlation coefficient r.
Work these in R. Using library(resampledata) and the dataset Spruce to conduct a test to see...
Work these in R. Using library(resampledata) and the dataset Spruce to conduct a test to see if the mean difference in how much the seedling grew (in height) over the course of the study under these two treatments are significantly different from each other. Answer the following: a) Set up a hypothesis using appropriate notation. b)Find the value of the observed test statistic using R. c)Compute the P-value of the observed test statistic using a permutation distribution with N= 10^5-1....
The R library faraway contains the pima dataset. We will fit a model with test as...
The R library faraway contains the pima dataset. We will fit a model with test as a response and bmi (only) as a predictor to see the relationship between the odds of a patient showing signs of diabetes and his/her bmi. The odds o and probability p are related by: o = p/(1-p), p = o(1+o) Using the GLM function: a. Please estimate the amount of increase in the log(odds) when the bmi increases by 10. b. Give a 95%...
data sets A and B are depwndent. fondthr critical value to test the claim, M=0. use...
data sets A and B are depwndent. fondthr critical value to test the claim, M=0. use alpha= .02. A.   6.2.     7.4.     9.3.    6.3.   6.4 B.   3.6.     2.5.      3.4.   2.3.   3.7
The data set ”airquality” in the R datasets library has data on ozone concentration, wind speed,...
The data set ”airquality” in the R datasets library has data on ozone concentration, wind speed, temperature, and solar radiation by month and day for May through September in New York. Attach airquality to your workspace and then construct side-by-side boxplots of Wind by Month. Month is a numeric variable in the airquality data frame. You can treat it as a factor by using the ”as.factor” function, e.g., > plot(Wind ∼ as.factor(Month)) Next, do an analysis of variance to determine...
Given two sets of data, A and B. i) Data set A has an r value...
Given two sets of data, A and B. i) Data set A has an r value of -.81 and data set B has an r value of .94 Describe the differences between the two data sets as completely as you can using the regression information we have learned. ii) Which linear regression equation, the one for A or the one for B, would probably be a better predictor? Why?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT