Sie sind auf Seite 1von 5

SM439: Nonparametric Statistics

Prof. Jager

Binomial Test
Example: (Rossman and Chance, 2008) The ancient Greeks extensively used the golden ratio in art and literature they believed that a width-to-length ratio of 1+2 5 = 0.618 was aesthetically pleasing. Some have conjectured that American Indians also used this ratio (Hand et al., 1993). The following data are width-to-length ratios for a random sample of 20 beaded rectangles used by the Shoshoni Indians to decorate their leather goods. 0.693 0.749 0.654 0.670 0.662 0.672 0.615 0.606 0.690 0.628 0.668 0.611 0.606 0.609 0.601 0.553 0.570 0.844 0.576 0.933

Use this data to determine whether there is evidence that the Shoshoni Indians also employed the golden ratio in their art. What are we trying to do here?

Old Way: Parametric methods New Way: Nonparametric methods BINOMIAL TEST!

USNA

26 Aug 2009

SM439: Nonparametric Statistics

Prof. Jager

Old Way: One-sample t-test Let = We want to test the following hypotheses:

Our test statistic is: In our sample:

If H0 is true, then: So our p-value is:

Conclusion:

Assumptions:

USNA

26 Aug 2009

SM439: Nonparametric Statistics

Prof. Jager

New Way: Binomial Test Test uses the median instead of the mean. For a continuous distribution, the median (.5 ) satises: P r(X > .5 ) = P r(X < .5 ) = .5 For the golden rule example, our hypotheses are then:

Our tests statistic is: B = If H0 is true, then the distribution of B is:

Our p-value is:

Conclusion:

USNA

26 Aug 2009

SM439: Nonparametric Statistics

Prof. Jager

Normal Approximation for Binomial Test When the sample is large enough (n 30), we can use the normal approximation to the binomial distribution to perform this test:

Note: Since we have computers, it is just as easy to calculate the p-value exactly, rather than approximately! For the approximation, our test statistic is: For our golden rule example:

USNA

26 Aug 2009

SM439: Nonparametric Statistics

Prof. Jager

Using R The sign.test() function from the BSDA library will perform a binomial test for us:
> library(BSDA) > goldenratio = read.table(file.choose(), header=T) > names(goldenratio) [1] "ratios" > attach(goldenratio) > sign.test(ratios, md = .618, alternative="two.sided") $rval One-sample Sign-Test data: ratios s = 11, p-value = 0.8238 alternative hypothesis: true median is not equal to 0.618 95 percent confidence interval: 0.6063494 0.6717671 sample estimates: median of x 0.641

$Confidence.Intervals Conf.Level Lower Achieved CI 0.8847 Interpolated CI 0.9500 Upper Achieved CI 0.9586

L.E.pt 0.6090 0.6063 0.6060

U.E.pt 0.6700 0.6718 0.6720

USNA

26 Aug 2009

Das könnte Ihnen auch gefallen