In: Statistics and Probability
In R, Use library(MASS) to access the data sets for this test. Use the Pima.tr data set to answer questions 1-5.
What is the average age for women in this data set?
What is the maximum number of pregnancies for women in this data set ?
What is the median age for women who have diabetes?
What is the median age for women who do not have diabetes?
What is the third quartile of the skin variable?
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)