Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

-Use the followingRcode to create the data and plot ofAgebySurvided. We will compare mean age of survived and non-survived group. (hint: you need to install

-Use the followingRcode to create the data and plot ofAgebySurvided. We will compare mean age of survived and non-survived group. (hint: you need to install the packages: "ggplot2", "dplyr", "tidyr", "titanic")

library(ggplot2)

library(dplyr)

library(tidyr)

library(titanic)

titanicData <-drop_na(titanic_train)

head(titanicData)

x1 <- titanicData$Age[titanicData$Survived==1]

x2 <- titanicData$Age[titanicData$Survived==0]

par(mfrow=c(2,1))

hist(x1,main="Survived",breaks=30)

hist(x2,main="Not Survived",breaks=30)

  • Calculate sample size, mean, SD for each groupx1(Survived) andx2(Not survived).
  • Let us denote1= mean forx1(Survived) and2= mean forx2(Not survived). Calculate 95% confidence intervals for each1and2.
  • Calculate 95% confidence intervals for the difference of means12.

-Do the test of the hypothesis

Use the significance level= 0.05.

H0:1=2vsH1:1=2.

-Do the test of the hypothesis

Use the significance level= 0.01.

H0:1=2vsH1:1<2.

-Find,and the power of the test for the hypothesis

H0:12=0vsH1:12=3.

at the significance level= 0.01.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Applied Calculus

Authors: Stefan Waner, Steven Costenoble

7th Edition

1337514306, 9781337514309

More Books

Students also viewed these Mathematics questions

Question

General Purpose of Your Speech Analyzing Your Audience

Answered: 1 week ago

Question

Ethical Speaking: Taking Responsibility for Your Speech?

Answered: 1 week ago