SM239 - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

SM239

Description:

Can also use 'shortcut' method with norminv. Draw the picture! SM339 Two sample. 10 ... Using shortcut method. Crit=norminv(.01,17,3.8/sqrt(5)) Using bisect ... – PowerPoint PPT presentation

Number of Views:25
Avg rating:3.0/5.0
Slides: 34
Provided by: johnt1
Category:

less

Transcript and Presenter's Notes

Title: SM239


1
SM239
  • SM239 began with probability models
  • Binomial, negative binomial
  • Poisson, Erlang(?)
  • Normal

2
SM239
  • Statistics ideas
  • Confidence bounds/ intervals for parameters
  • Hypothesis testing
  • Rejection regions, critical values, power(?)
  • P-values after data has been collected

3
SM239
  • Applied these for
  • 1 mean
  • 1 proportion

4
SM239
  • This semester, we will cover
  • 2 means, 2 proportions
  • gt2 proportions
  • gt2 means
  • Linear regression yf(x1, x2, )
  • Principal Components when the observations are
    vectors

5
SM239
  • To find a 95 upper confidence bound for p in
    binomial, given x successes in N trials
  • Find p to solve 0.05 Prob(x or fewer successes)
  • To find lower bound, solve 0.05 Prob(x or more
    successes)

6
SM239
  • To solve f(x)k, where f(x) is a continuous fn of
    x
  • Bisect(_at_(x) f(x), k, low, hi, tol)
  • The soln must lie in the range lowlt xlt hi
  • Result will be accurate to tol

7
SM239
  • For upper bound when we observe 4 successes in 11
    trials
  • Bisect(_at_(p) sum(binopdf(04,11,p)), .05, .3, .9,
    .0001)

8
SM239
  • To find 90 lower conf bound for mean when we
    observe avg and SD is known
  • Solve for mean where 0.10 prob(avg or greater
    for given mean)

9
SM239
  • Suppose avg23, SD5.1, N7
  • Bisect(_at_(m) 1-normcdf(23,m, 5.1/sqrt(7)), .1, 10,
    23, .00001)
  • Can also use shortcut method with norminv
  • Draw the picture!

10
SM239
  • Find critical value to test
  • H0 mean17
  • Ha meanlt17
  • Based on avg when SD3.8, N5 and alpha0.01

11
SM239
  • Using shortcut method
  • Critnorminv(.01,17,3.8/sqrt(5))
  • Using bisect
  • Bisect(_at_(x) normcdf(x,17, 3.8/sqrt(5)), .01,
    10,17, .00001)

12
Power
  • Power is the prob we reject H0 when H0 is false
  • Since Ha is typically of the form meanlt25 or p
    not 0.5, we must specify the parameter value
    where we are computing power

13
Power
  • Suppose we test
  • H0 mean15
  • Ha meanlt15
  • Based on avg of 7 values when we assume SD6.3
  • We let the RR be avglt12

14
Power
  • Note that alpha is given by
  • gtgt normcdf(12,15,6.3/sqrt(7))
  • 0.1039
  • To find the power when the mean is 13, we find
    the prob of RR when mean13
  • gtgt normcdf(12,13,6.3/sqrt(7))
  • 0.3373
  • So when the mean is 12, there is a 34 chance
    that we will (correctly) reject H0

15
Power
  • The power when mean10 is
  • gtgt normcdf(12,10,6.3/sqrt(7))
  • 0.7995
  • From the picture, we can see that power increases
    as the mean decreases (in this case)

16
Power
  • We can use alpha and power to determine sample
    size in the normal case
  • (1) The critical value depends on alpha and N
  • (2) For a given critical value, power depends on
    N
  • Together, these can determine N

17
Power
  • In the previous problem, suppose we set
    alpha0.10 and want the power to be 0.75 when
    mean13
  • Guess and test
  • gtgt n20
  • gtgt critnorminv(.1, 15,6.3/sqrt(n))
  • 13.1946
  • gtgt powernormcdf(crit,13,6.3/sqrt(n))
  • 0.5549
  • Power too low. Need to increase N

18
Power
  • gtgt n30
  • gtgt critnorminv(.1, 15,6.3/sqrt(n))
  • 13.5259
  • gtgt powernormcdf(crit,13,6.3/sqrt(n))
  • 0.6763
  • Closer. Need to increase N more

19
Power
  • gtgt bisect(_at_(n) normcdf( norminv(.1,
    15,6.3/sqrt(n)),13,6.3/sqrt(n)), .75,20,100,.1)
  • ans
  • 37.8906
  • So, N38

20
Sign Test
  • We always begin with a probability model and then
    work with parameters of the distribution
  • P in binomial
  • Mean in normal

21
Sign Test
  • Nonparametrics
  • Do not specify/ assume a probability model
  • Methods that work regardless of the underlying
    distn

22
Sign Test
  • The (population) Median has the property that
    Prob(XgtMedian) Prob(Xlt Median) ½
  • (Assume a continuous distn)

23
Sign Test
  • Suppose we wish to test
  • H0 Median19
  • Ha Medianlt19
  • Based on a sample of 12 observations
  • Our statistic will be the of observations that
    are lt19
  • (Could also use that are gt19)

24
Sign Test
  • Suppose we want alphalt0.10
  • Reject H0 if Prob(Xgtk) lt 0.10
  • And X has binomial distn with p1/2
  • gtgt sum(binopdf(812,12,.5))
  • 0.1938
  • gtgt sum(binopdf(912,12,.5))
  • 0.0730
  • So reject H0 if 9 or more values are lt19

25
Sign Test
  • Suppose that 10 values are lt19
  • Find p-value
  • gtgt sum(binopdf(1012,12,.5))
  • 0.0193

26
Sign Test
  • Can find confidence intervals by finding value of
    median so that tail probability is desired value
  • Suppose that we have a sample of size 20 and want
    to find a 85 lower conf bound for the median
  • Use values below median as our statistic
  • A median is OK if Prob(statistic) is at least 15

27
Sign Test
  • gtgt sum(binopdf(08,20,.5))
  • 0.2517
  • gtgt sum(binopdf(07,20,.5))
  • 0.1316
  • So, if there are 8 values below a given median,
    it is OK
  • If there are only 7 below, then that median is
    NOT in confidence bound
  • The 75 lower conf bound is (just above) the 8th
    smallest value

28
Paired Sign Test
  • Paired data consists of two measurements on each
    subject
  • Helpful when there might be differences between
    subjects that would confuse the results

29
Paired Sign Test
  • Want to know if quiet meditation will improve
    math scores
  • Give some math problems to students
  • Then have students spend 5 minutes in quiet
    meditation
  • Then give another test

30
Paired Sign Test
  • We could see how many students did better on the
    second test than on the first
  • Suppose that 16 of 25 students did better on the
    second test

31
Paired Sign Test
  • H0 prob(better on 2nd test)1/2
  • Ha probgt1/2 if meditation helps
  • P-value prob(16 or more of 25 did better on 2nd
    test)
  • gtgt sum(binopdf(1625,25,.5))
  • 0.1148

32
Paired Sign Test
  • See Table 8.15, p 341
  • 10 subjects given 2 types of aspirin
  • Want to know if there is any difference between
    the types of aspirin
  • For 8 patients, Type A was higher
  • For 1 patient (5), they were the same
  • For 1 patient (6), B was higher

33
Paired Sign Test
  • When there is a tie (both the same) we usually
    omit this from our data
  • So, of the 9 where there is a difference, 8
    showed A to be higher
  • gtgt sum(binopdf(89,9,.5))
  • 0.0195
  • But the question was two-sided, so p-value4
  • This is small, so we conclude that there is a
    difference between A and B
Write a Comment
User Comments (0)
About PowerShow.com