5.6, 5.14, 5.20, 5.32, 5.48

5.6 Working backwards, Part II.

sample mean= lower tail + upper tail /2

sample_mean <- (65+77)/2

Answer:: Our sample mean is 71

Calculate Margin of Error

my_moe <- 77-71

Answer:: My margin of error is 6

Get tscore value from df

our_t <- qt(.05, df=24)

Answer:: Our t-value is -1.7108821

Plug in to equations, solve for Sample Standard deviaton

SE= (Tval) (s/ sqrt(n)) (SE*sqrt(n))/ (Tval) =s

sample_error=round((6/1.71)*5,2)

Answer:: our sample Standard deviaton is 17.54

5.14 SAT scores.

(a) Raina wants to use a 90% confidence interval. How large a sample should she collect?

  • Conditions to use normal distribution seem to be met. Sample size is well over 30, independent and we know the populations std deviation

We are looking for x in ME=hval* std_dev/sqrt(X)

Desired_N

x <- 250^2/(25^2/1.645^2)

Answer:: our desired sample size 270.6025

(b) Luke wants to use a 99% confidence interval.

  • Given a 99% CI the desired Z value score(or Tscore if being used) would be higher. A higher Z value score will decrease the denominator in the formula above, which would make our total N value increase

(c) Calculate the minimum required sample size for Luke.

#t_val_99 <- qt(.005, df=249)
our_desired_N_99 <- 250^2/(25^2/2.576^2)

Answer:: our desired sample size 663.5776

5.20

(a) Is there a clear difference in the average reading and writing scores?

  • The median in the writing score seems a little higher, the mean scores seem very similar. The difference distribution seems like it is close to normally distrbuted, centered at 0 which would indicate the scores are in fact very similar.

(b) Are the reading and writing scores of each student independent of each other?

(c) Create a hypothesis test

H~O: There is no difference between the average reading and writing score \[U_{diff}=0\] H~A: There is a difference between the average reading and writing score \[U_{diff} \neq0\]``

(d) Check the conditions required to complete this test.

(e)these data provide convincing evidence of a difference between the average scores on the two exams?

\[ tscore= (U_{diff}-0)/(S_{diff}/\sqrt{N}) \]

t=round(.545/(8.887/sqrt(200)),2)
df=199
our_t_2 <- qt(.05, df=199)

our_p_val <- pt(t,199,lower.tail = FALSE)

(f) What type of error might we have made? Explain what the error means in the context of the application.

(g) Based on the results of this hypothesis test, would you expect a confidence interval to include 0? Explain your reasoning.

5.32

\[ df=25\] \[ U_{diff}= 19.85-16.12=3.73 \]

my_u_diff <- 19.85-16.12
my_se_now <- sqrt(3.58^2/26+4.51^2/26)

\[ SE= \sqrt{ \frac{3.58^2}{26}+\frac{4.51^2}{26}} \]

\[ tscore= \frac{U_{diff}}{SE}\]

the_t <- round(my_u_diff/my_se_now,2)

Our t score is 3.3

our_p_val_now <- 2*(pt(the_t,25,lower.tail = FALSE))

5.48

A.

HW=hours worked

\[ H_{o}= μ_{lessHsHW} =μ_{HsHW}=μ_{JrCollHW}=μ_{BachelorHW}=μ_{GraduateHW} \] HA: The average hours worked varies across some (or all) groups.

B.

  • the observations are independent within and across groups-Probably TRUE
  • the data within each group are nearly normal-TRUE
  • the variability across the groups is about equal.-TRUE

C

.. Df Sum sq Mean sq F value pr>F
degree 4 2004.08 501.54 2.1868 .0682
residuals 1167 267382 229.1120
total 1171 269388.16

D. Conclusion