Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Just answer the Q3 and Q4 use R language 3. Where x1,x2, ,Fn s a sample from a normal distribution with unknown mean and unknown

Just answer the Q3 and Q4 use R language

image text in transcribedimage text in transcribed

3. Where x1,x2, ,Fn s a sample from a normal distribution with unknown mean and unknown variance 2, the level 100(1-a)% confidence interval for is given by where and s are the sample mean and sample standard deviation of the data, and t1-a/2,- cuts off an area 1 - a/2 to its left under the t curve with n -1 degrees of freedom. Write a function which has two arguments, a vector of data x, and alpha, which should have a default value of .05. The function should return a vector of length 2 which contains the endpoints of the confidence interval. The percentiles of the t-distrubtion can be calculated as follows. Suppose that you want the 97.5'th percentile of the t-distribution with 23 degrees of freedom. This can be calculated in R as qt.975,23) ## [1] 2.068658 Test your function by calculating the 99% confidence interval using the following data set.seed(87612345) data-rnorm (25,mean-4.5,sd-.75) You can check your calculation using t.test (data,conf.level-.99)

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

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Eric Redmond ,Jim Wilson

1st Edition

1934356921, 978-1934356920

More Books

Students also viewed these Databases questions

Question

Could Joe have anticipated Wolfgangs approach?

Answered: 1 week ago

Question

Explain three things you can do to manage your social networking.

Answered: 1 week ago