In: Math
Can you please show both in RStudio code? Thank You
Airports:
The temperature is recorded at 60 airports in a region. The average temperature is 68 degrees Fahrenheit with a standard deviation of 5 degrees. The last known average temperature from all airports is 67 degrees Fahrenheit. Is the recorded temperature at the 60 airports different from the average temperature at all airports?
New York Attitudes:
The New York Chamber of Commerce has asked you to do a study concerning people's attitudes toward our city. As part of the study, you will ask them to rate their image of New York on a scale from 1 to 100 (1= awful city - call in the bulldozers; 100 = wonderful city - there is none better). Previous data show this scale is normally distributed with a last known population average rating of 50 and a standard deviation of 10.
Q1. ANSWERING FIRST QUESTION.
Given that,
population mean(u)=67
sample mean, x =68
standard deviation, s =5
number (n)=60
null, Ho: μ=67
alternate, H1: μ!=67
level of significance, alpha = 0.05
from standard normal table, two tailed t alpha/2 =2.001
since our test is two-tailed
reject Ho, if to < -2.001 OR if to > 2.001
we use test statistic (t) = x-u/(s.d/sqrt(n))
to =68-67/(5/sqrt(60))
to =1.5492
| to | =1.5492
critical value
the value of |t alpha| with n-1 = 59 d.f is 2.001
we got |to| =1.5492 & | t alpha | =2.001
make decision
hence value of |to | < | t alpha | and here we do not reject
Ho
p-value :two tailed ( double the one tail ) - Ha : ( p != 1.5492 )
= 0.1267
hence value of p0.05 < 0.1267,here we do not reject Ho
ANSWERS
------------------------------------------------------------------------------
null, Ho: μ=67
alternate, H1: μ!=67
test statistic: 1.5492
critical value: -2.001 , 2.001
decision: do not reject Ho
p-value: 0.1267