26
Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Embed Size (px)

Citation preview

Page 1: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Proportions for the Binomial Distribution

©2005 Dr. B. C. Paul

Page 2: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

We Did an Example in which we somehow knew all the values for p How do we really know the proportion of

successes and failures Done with statistical tests like all the other

values

Page 3: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Example

We saw the gassifier system was the IGCC Achilles Heal last time around

Coolstick Candles has a metal candle they believe can replace ceramic candles and increase available up time Coolstick claims they can get 96% availability You go to actual operations using the Coolstick

Candles and look at availability statistics Taking random checks of availability you enter 1 if the

candles were available and 0 if not.

Page 4: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

First Enter Data in SPSS

Page 5: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Next Test the ProportionHighlight and Click on Analyze toPull down the menu

Go to Non Parametric Tests andHighlight to bring out the pop-outMenu

Highlight and click on Binomial

Page 6: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Set Up the Test

Select Candleswork for our variable

We will need to change the testProportion since the program wantsTo compare every proportion to0.5

Page 7: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Set the Proportion and Look at Options

I reset the proportion to 0.95(the company’s claimedAvailability)

I clicked on options to bring upThe option menu

I will check-off descriptive statisticsAnd hit continue.

Page 8: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

After Clicking OK I get my output

Our 60 observationsShowed 90%Availability not 95%

Page 9: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Looking at Our Test Table

Binomial Test

1.00 54 .90 .95 .079a,b

.00 6 .10

60 1.00

Group 1

Group 2

Total

CandlesworkCategory N

ObservedProp. Test Prop.

Asymp. Sig.(1-tailed)

Alternative hypothesis states that the proportion of cases in the first group < .95.a.

Based on Z Approximation.b.

The test tells us that our chances of pulling a sample of 60 with a proportion of90% when the actual value of p is 95% is just under 8%(Since 5% is standard in statistics we probably will not reject that 0.95 is possible)

Page 10: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Paying Attention to the Footnotes

Binomial Test

1.00 54 .90 .95 .079a,b

.00 6 .10

60 1.00

Group 1

Group 2

Total

CandlesworkCategory N

ObservedProp. Test Prop.

Asymp. Sig.(1-tailed)

Alternative hypothesis states that the proportion of cases in the first group < .95.a.

Based on Z Approximation.b.

The program does a one tailed test on the odds of the observed value being inWhich ever direction chosen from the actual value.

It also mentions a Z Approximation.

Page 11: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

The Z Approximation

If you have a p value of 0.5 and a decent size sample (above 50 or more) And you plot the number of cases with 0 positives, 1

positive etc. The distribution comes out looking like discrete value

points under a normal distribution curve This suggests that the normal distribution can be

used for getting odds on binomial events Program uses that fact.

Page 12: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Problems with the Z approximation

It works well when p=0.5 Which is the reason SPSS tried to default to 0.5

Odds are actually skew compared to normal if p is different from 0.5 P=0.95 is an extreme case We would need probably over 1000 samples to get a

good approximation with the normal distribution SPSS has exact options for people who know

their Z approximations are at risk of being screwed up

Page 13: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Using An Exact Option

I clicked on exact to bring up the next menu

I can approach it two ways

Monte Carlo

Exact

The default is asymptotic (ie meaning asYour data set gets large enough you will tendTo converge toward a normal distribution)

Page 14: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Explaining the Options

Monte Carlo means making a large number of random trials and then counting results

Exact means exhaustively computing every possibilityBetter have a fast machine with a lot of

memory

Page 15: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

For a Sample of 60 I could get exhaustive calculations fairly easily

Binomial Test

1.00 54 .90 .95 .079a,b .079

.00 6 .10

60 1.00

Group 1

Group 2

Total

CandlesworkCategory N

ObservedProp. Test Prop.

Asymp. Sig.(1-tailed)

Exact Sig.(1-tailed)

Alternative hypothesis states that the proportion of cases in the first group < .95.a.

Based on Z Approximation.b.

Note that in this case the Z approximation gave us amazingly good resultsWe got just under 8% as an exact value

Page 16: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Z Approximation Allows one to Build Confidence Intervals Have not found an

option to do this in SPSS

Doing it manually

oftriestotaln

sofsuccesser

where

n

rp

#

#

'

We already know for ourData set r= 54 (running) n= 60 (tries) p’=0.9

Page 17: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Setting Up a 95% Confidence Interval

n

qpp

n

qpp

p

p

l

u

''*96.1'

''*96.1'

Plugging and Chugging – p is between 0.8448 and 0.9551

Page 18: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Interesting Conclusions

0.9 seems suspiciously below 0.95 but I cannot rule out that it might be 0.95

Flip side is that regular ceramic candles do 0.87 availability which is also in the confidence intervalThus I not only cannot say these candles are

better than ordinary ceramics – I cannot say they are not worse

Page 19: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

May be times I will want to compare two binomial data sets Example

Gasifiers tend to eat refractory (causes down time)

Suppose I try a new refractory and then compare availability before and after the change

I pick the same 24 days for months before and after the change and compare.

Page 20: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Enter my Before and After Availability Data in SPSS

Page 21: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Set Up to Analyze My Data

Pull down the Analyze Menu

Select Nonparametric

Highlight two related samples

Page 22: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Set Up My Test

Highlight and Click on Before

Note it appeared in the variable 1 box

Page 23: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Continue With My Set-Up

Highlight the After

Note that both selections are now highlightedAnd variable two is listed as after

Page 24: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

More of the Set-Up

I clicked the arrow to move theGroup over into the test variableslist

I reset my test to a McNemar test(which is the type used for this kindOf problem)

Page 25: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Clicking on Ok We Get Results

We have two days of the monthThat had run the previous monthThat did not run this monthAnd three days that ran this monthThat had not run the previousMonth.

The significance is nothing

(We cannot say the refractory changeHas helped based on this data)

Page 26: Proportions for the Binomial Distribution ©2005 Dr. B. C. Paul

Basic Portfolio of tests on proportions SPSS can also test proportions on two

sample sets to see if they are the same These are the methods of measuring

proportions with binomial data