Question

In: Statistics and Probability

Data set “quine” from MASS package children from an Australian town is classified by ethnic background,...

Data set “quine” from MASS package children from an Australian town is classified by ethnic background, gender, age, learning status and the number of days absent from school. The columns “Eth” indicates whether the student is Aboriginal or not (“A” or “N”), and the column Sex indicates Male or Female (“M” or “F”).

a) Print the first five observations of the data.
b) Is the proportion of aboriginal female different from that of male?

Use R to solve and show R code

Solutions

Expert Solution

Load the library MASS.use dim statement to view columns and observations.

with print statement print the observations

To view the column names use names statement

Rcode is:

library(MASS)
dim(quine)
names(quine)
print(quine)

head(quine)

Ou Eth Sex Age Lrn Days
1 A M F0 SL 2
2 A M F0 SL 11
3 A M F0 SL 14
4 A M F0 AL 5
5 A M F0 AL 5
6 A M F0 AL 13

Solutionb;

b) Is the proportion of aboriginal female different from that of male?

use below R code:

prop.test(table(quine$Eth,quine$Sex))

Output:

2-sample test for equality of proportions with continuity correction

data: table(quine$Eth, quine$Sex)

X-squared = 2.606e-30, df = 1, p-value = 1

alternative hypothesis: two.sided

95 percent confidence interval:

-0.1616919 0.1722321

sample estimates:

prop 1 prop 2

0.5507246 0.5454545

p=1

there is no sufficient statistical evidence at 5% level of significance to conclude that  proportion of aboriginal female different from that of male

that is  proportion of aboriginal femaleis not different from that of male.


Related Solutions

This problem uses the data set Heights from the alr4 package, which contains the heights of...
This problem uses the data set Heights from the alr4 package, which contains the heights of n = 1375 pairs of mothers (mheight) and daughters (dheight) in inches. (Solve this problem in r) (a) Compute the regression of dheight on mheight, and report the estimates, their standard errors, the value of the coefficient of determination, and the estimate of variance. Write a sentence or two that summarizes the results of these computa- tions. (b) Obtain a 99% confidence interval for...
The dataset ’anorexia’ in the MASS package in R-Studio contains data for an anorexia study. In...
The dataset ’anorexia’ in the MASS package in R-Studio contains data for an anorexia study. In the study, three treatments (Treat) were applied to groups of young female anorexia patients, and their weights before (Prewt) and after (Postwt) treatment were recorded. The three treatments adminstered were no treatment (Cont), Cognitive Behavioural treatment (CBT), and family treatment (FT). Determine at the 5% significance level if there is a difference in mean weight gain between those receiving no treatment and those receiving...
The dataset ’anorexia’ in the MASS package in R-Studio contains data for an anorexia study. In...
The dataset ’anorexia’ in the MASS package in R-Studio contains data for an anorexia study. In the study, three treat- ments (Treat) were applied to groups of young female anorexia patients, and their weights before (Prewt) and after (Postwt) treatment were recorded. The three treatments adminstered were no treatment (Cont), Cognitive Behavioural treatment (CBT), and family treatment (FT). Determine at the 5% significance level if there is a difference in mean weight gain between those receiving no treatment and those...
Use RStudio. The carsafety data set in the UsingR package has records of the number of...
Use RStudio. The carsafety data set in the UsingR package has records of the number of passenger deaths in the “Other.deaths” column and the type of vehicle in the type column. Determine which type of vehicle is the deadliest for passengers by looking at difference in variance between groups.
Install the `babynames` package with `install.packages()`. This package includes data from the Social Security Administration about...
Install the `babynames` package with `install.packages()`. This package includes data from the Social Security Administration about American baby names over a wide range of years. Generate a plot of the reported proportion of babies born with the name Angelica over time. Do you notice anything odd about the plotted data? (Hint: you should) If so, describe the issue and generate a new plot that adjusts for this problem. Make sure you show both plots along with all code that was...
2. The dataset ’anorexia’ in the MASS package in R-Studio contains data for an anorexia study....
2. The dataset ’anorexia’ in the MASS package in R-Studio contains data for an anorexia study. In the study, three treatments (Treat) were applied to groups of young female anorexia patients, and their weights before (Prewt) and after (Postwt) treatment were recorded. The three treatments adminstered were no treatment (Cont), Cognitive Behavioural treatment (CBT), and family treatment (FT). Determine at the 5% significance level if Cognitive Behavioral treatment is effective in helping patients gain weight. Perform all necessary steps for...
******. The openintro package contains a data set called bdims, ****which consists of the body dimensions...
******. The openintro package contains a data set called bdims, ****which consists of the body dimensions of 507 physically active individuals. ****Complete a full multivariate regression analysis, ***predicting the variable wgt (weight) using all significant elements. *****You should do a stepwise variable selection procedure, and explore the data. ******** R code
Refer to the air-conditioning data set aircondit provided in the boot package. The 12 observations are...
Refer to the air-conditioning data set aircondit provided in the boot package. The 12 observations are the times in hours between failures of air-conditioning equipment 3, 5, 7, 18, 43, 85, 91, 98, 100, 130, 230, 487. Use R software
Refer to the air-conditioning data set aircondit provided in the boot package. The 12 observations are...
Refer to the air-conditioning data set aircondit provided in the boot package. The 12 observations are the times in hours between failures of air-conditioning equipment 3, 5, 7, 18, 43, 85, 91, 98, 100, 130, 230, 487. Assume that the times between failures follow an exponential model Exp(λ). Obtain the MLE of the hazard rate λ and use bootstrap to estimate the bias and standard error of the estimate. Use R software
The data set mantel in the alr4 package has a response Y and three predictors x1,...
The data set mantel in the alr4 package has a response Y and three predictors x1, x2 and x3. (a) Apply the forward selection and backward elimination algorithms, using AIC as a criterion function. Report your findings. (b) Use regsubsets() function in R to determine the best model. Which appear to be the important predictors? What’s the final model? Explain your reasoning.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT