Professional Documents
Culture Documents
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
Prof. Jager
Old Way: One-sample t-test Let = We want to test the following hypotheses:
Conclusion:
Assumptions:
USNA
26 Aug 2009
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:
Conclusion:
USNA
26 Aug 2009
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
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
USNA
26 Aug 2009