Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need some help with showing this work by hand. Here is the question: Q: Without the aid of the built-in R command, compute the

I need some help with showing this work by hand. Here is the question:

Q: Without the aid of the built-in R command, compute the test you conducted in the previous exercise, number 4, including the 95% confidence interval [hint if using the R calculator: qt(.975,df=125) or t-critical=1.979124] and ensure you are using the correct standard error of the mean]. If appropriate, compute and interpret a measure of the strength of the relationship between ROLE (officer v. subject) and AGE. You can type directly into your R script file (using comments) and upload to Canvas a pdf showing your handwritten work and interpretation.

The work that was done in R is:

> age.means=tapply(polshootnew$AGE,INDEX=polshootnew$ROLE,FUN=mean)

> age.means

> Officer.AGE=c(41.0,39.0,41.0,50.0,49.0,40.0,53.0,32.0,32.0,55.0,27.0,30.0,36.0,32.0,36.0,41.0,35.0,48.0,47.0,37.0,37.0,34.0,49.0,31.0,32.0,31.0,29.0,33.0,50.0,37.0,28.0,30.0,40.0,28.0,25.0,29.0,45.0,40.0,26.0,25.0,39.0,42.0,32.0,30.0,33.0,49.0,45.0,41.0,37.0,35.0,31.0,31.0,28.0,26.0,40.0,31.0,46.0,27.0,51.0,40.0,27.0,42.0,55.0,33.0,44.0,30.0,46.0,44.0,42.0,29.0,35.0,35.0,46.0,38.0,33.0,53.0,30.0,41.0)

> Subject.AGE=c(40.0,24.0,29.0,35.0,28.0,37.0,29.0,23.0,35.0,17.0,20.0,28.0,17.0,40.0,30.0,52.0,39.0,32.0,57.0,20.0,20.0,40.0,17.0,18.0,42.0,31.0,36.0,25.0,25.0,36.0,43.0,36.0,35.0,26.0,25.0,23.0,23.0,33.0,23.0,28.0,35.0,43.0,22.0,23.0,49.0,19.0,53.0,17.0,33)

> OfficerAGE.mean=mean(Officer.AGE)

> OfficerAGE.mean

> SubjectAGE.mean=mean(Subject.AGE)

> SubjectAGE.mean

> Officer.sd=sd(Officer.AGE)

> Officer.sd

> Subject.sd=sd(Subject.AGE)

> Subject.sd

> t.test(x=Subject.AGE,y=Officer.AGE,alternative="greater",conf.level=.95)

>(SubjectAGE.mean-OfficerAGE.mean)+c(-1,1)*qt(0.95,df=85)*sqrt(Officer.sd^2/78+Subject.sd^2/49)

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_2

Step: 3

blur-text-image_3

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