2 subtract the sample median from its respective

This preview shows page 2 - 4 out of 4 pages.

2. subtract the sample median from its respective sample data > diffmeterusage = meterusage - median(meterusage) > diffnometerusage = nometerusage - median(nometerusage) Feel free to look at your vectors that contain ( X i,Meterusage tildewide X Meterusage ) and ( X j,Nometerusage tildewide X Nometerusage ) 3. Take the absolute value of these differences: > abdiffmeterusage = abs(diffmeterusage) > abdiffnometerusage = abs(diffnometerusage) Now type abdiffmeterusage and abdiffnometerusage and compare the data appearing in these data vectores to diffmeterusage and diffnometerusage .
c circlecopyrt Jim Stallard 2018 3 4. Conduct a two-sided “Pooled” T -test on the data appearing in the ‘absolute differences from the sample median” data vectors you created in the previous step: > t.test(abdiffmeterusage, abdiffnometerusage, alternative="two.sided", var.equal=T) What do you notice? You should get a test statistic in the neighbourhood of T Calc = 2 . 34 (-2.3413) and a P -value of 0.02487 . Does the result of Levene’s test support your commentary in Lab Exercise 1(d)?
Lab Exercise 2: Referring to Lab Exercise 1: Consider the sample taken from households that have water meters. Does the sample of 22 households indicate that the standard deviation in the monthly water usage is less than 5 meters 3 ? Test using α = 0 . 01. Lab Exercise 3: Recall Lab Exercise #4 from last week’s lab, Lab Seven. You were asked to test the following hypotheses: H 0 : p 0 . 98 H A : p < 0 . 98 based on a random sample of n = 125 items and a presumed value of α = 0 . 05. It was found that hatwide p = 118 125 = 0 . 944, Z Calc = 2 . 875 and the P -value can be verified to be 0.00202 . (a) Assuming that statistical testing is to be done at α = 0 . 05, for what values of the sample proportion would H 0 be rejected in favour of H A ? That is, find the critical value of the sample proportion, hatwide p critical . (b) Suppose 94% of all items produced by this manufacturing process are of satisfactory quality. Using your result in (a), find the probability that you will conclude from n = 125 that the proportion of items produced by this manufacturing process that are of satisfactory quality is at least 98%. (c) If the quality control inspector were to select a sample size based on α = 0 . 05 and β = 0 . 10, how many items would he randomly select? Lab Exercise 4:

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture