Nonparametric Hypotheses Tests

Sheldon M. Ross , in Introductory Statistics (Third Edition), 2010

Example 14.1

The inventory ordering policy of a particular shoe store is partly based on the belief that the median foot size of teenage boys is 10.25 inches. To test this hypothesis, the foot size of each of a random sample of 50 boys was determined. Suppose that 36 boys had sizes in excess of 10.25 inches. Does this disprove the hypothesis that the median size is 10.25?

Solution

Let N be a binomial random variable with parameters (50, 1/2). Since 36 is larger than 50(1/2) = 25, we see that the p value is

p value = 2 P { N 3 6 }

We can now use either the normal approximation or Program 5-1 to explicitly compute this probability. Since

E [ N ] = 5 0 × 1 2 = 2 5 V a r ( N ) = 5 0 × 1 2 × 1 2 = 1 2 . 5

the normal approximation yields the following:

p value = 2 P { N 3 6 } = 2 P { N 3 5 . 5 } (the ) = 2 P { N 2 5 1 2 5 3 5 . 5 2 5 1 2 5 } 2 P { Z 2 . 9 7 } = 0 . 0 0 3 0 from Table D. 1

(Program 5-1, which computes binomial probabilities, yields the exact value 0.0026.) Thus the belief that the median shoe size is 10.25 inches is rejected even at the 1 percent level of significance. There appears to be strong evidence that the median shoe size is greater than 10.25.

Suppose X 1, …, Xn are the n sample data values. Since the value of the test statistic depends on only the signs, either positive or negative, of the values Xi m, the foregoing test is called the sign test.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780123743886000144

DISTRIBUTIONS OF SAMPLING STATISTICS

Sheldon M. Ross , in Introduction to Probability and Statistics for Engineers and Scientists (Fourth Edition), 2009

SOLUTION

Let X denote the number of students that attend; then assuming that each accepted applicant will independently attend, it follows that X is a binomial random variable with parameters n = 450 and p = .3. Since the binomial is a discrete and the normal a continuous distribution, it is best to compute P{X = i} as P{i – .5 < X < i + .5} when applying the normal approximation (this is called the continuity correction). This yields the approximation

P { X > 150 . 5 } = P { X - ( 450 ) ( . 3 ) 450 ( . 3 ) ( . 7 ) 150 . 5 - ( 450 ) ( . 3 ) 450 ( . 3 ) ( . 7 ) } P { Z > 1 . 59 } = . 06

Hence, only 6 percent of the time do more than 150 of the first 450 accepted actually attend.

It should be noted that we now have two possible approximations to binomial probabilities: The Poisson approximation, which yields a good approximation when n is large and p small, and the normal approximation, which can be shown to be quite good when np (1 − p) is large. [The normal approximation will, in general, be quite good for values of n satisfying np (1 − p) ≥ 10.]

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780123704832000114

Measures of Association, Comparison of Means or Proportions

Christophe Lalanne , Mounir Mesbah , in Biostatistics and Computer-based Analysis of Health Data using SAS, 2017

3.2.1 Chi-square test for the independence between two qualitative variables

The PROC FREQ procedure is the appropriate procedure as shown in the example that follows:

PROC FREQ DATA   =   birthwt;

TABLES smoke*low/CHISQ ;

FORMAT smoke tobacco. low low.;

run;

The test for the comparison of the percentages of baby births with low weight, according to the smoking status is achieved by means of a chi-square test. A number of other equivalent tests are also given by default (likelihood ratio test) and a chi-square test with continuity correction and Fisher's exact test (these last two are to be considered in the presence of low theoretical counts).

Figure 3.13. Results from the execution of the UNIVARIATE procedure

Figure 3.14. Continuation of the results from the execution of the UNIVARIATE procedure

The results in the contingency table that appear in the cells are in this order: observed counts, observed percentage, row percentage and column percentage.

Figure 3.15. Results from the execution of the FREQ procedure

It is possible to modify these outputs. Therefore, for example, the following program will print the table containing observed and theoretical counts only.

PROC FREQ DATA=birthwt;

TABLES smoke*low/EXPECTED NOCOL NOROW NOPERCENT ;

FORMAT smoke tobacco. low low.;

run;

It is also possible to request that several tables be printed at the same time (as well as statistics based on them).

Simultaneous printing

Statement Equivalent statement
tables A*(B C) tables A*B A*C
tables (A B)*(C D) tables A*C B*C A*D B*D
tables (A B C)*D tables A*D B*D C*D
tables A - - C tables A B C
tables (A - - C)*D tables A*D B*D C*D

Figure 3.16. Continuation of the results from the execution of the FREQ procedure (tests of association)

We can also request that simple histograms be printed (here the observed counts).

PROC FREQ DATA=birthwt;

TABLES smoke*low/ PLOTS   =   freqplot ;

format smoke tobacco. low low.;

run;

Figure 3.17. Results from the execution of the FREQ procedure (observed and theoretical counts)

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9781785481116500034

Tests of Hypotheses

Ronald N. Forthofer , ... Mike Hernandez , in Biostatistics (Second Edition), 2007

8.3 Testing Hypotheses about the Proportion and Rates

In this section we focus on situations for which the use of the normal distribution as an approximation for the binomial distribution is appropriate. In general, these are situations in which the sample size is large.

Example 8.4

In Chapter 7 (Example 7.4) we considered the immunization level of 5-year-olds. The health department took a sample and, based on the sample, would decide whether or not to provide additional funds for an immunization campaign. In Example 7.4 we examined both the 99 percent confidence interval and a one-sided interval. Since the health department will provide additional funds if the proportion of immunization is less than 75 percent, we consider a one-sided test here, considering the following null and alternative hypotheses

H 0: π = π0 = 0.75 and H a: π < π0 = 0.75.

The test statistic for this hypothesis is

z | p - π 0 | - 1 / ( 2 n ) p ( 1 - p ) / n .

If (p − Ï€0) is positive, a positive sign is assigned to z; if the difference is negative, a minus sign is assigned to z. The rejection region consists of values of z less than or equal to z a . This framework is very similar to that used with the population mean, the only difference being the use of the continuity correction with the proportion.

The sample proportion, p, had a value of 0.614 based on a sample size of 140. Thus, the calculation of z is

z = | 0.614 - 0.75 | - 1 / ( 2 { 140 } ) 0.614 ( 1 - 0.614 ) / 140 = 3.219.

Since (p − Ï€0) is negative, the test statistic's value is −3.219. If the test is performed at the 0.01 significance level, values of z less than or equal to −2.326 form the rejection region. Since z is less than −2.326, we reject the null hypothesis in favor of the alternative. The health department should devote more funds to an immunization effort. This conclusion agrees with that reached based on the confidence interval approach in Chapter 7.

The continuity correction can be eliminated from the calculations for relatively large sample sizes because its effect will be minimal. For example, if we had ignored the continuity correction in this example, the value of the test statistic would be −3.306, not much different from −3.219. The computer can be used to analyze these data (see Program Note 8.2 on the website).

The same procedure applies to the test of crude and adjusted rates. Just as in Chapter 7, we treat rates as if they were proportions. This treatment allows for a simple approximation to the variance of a rate and also gives a justification for the use of the normal distribution as an approximation to the distribution of the rate. Thus, our test statistic has the same form as that used for the proportion.

Example 8.5

Suppose that we wish to test, at the 0.05 significance level, that the 2002 age-adjusted death rate for the American Indian/Alaskan Native male population, obtained by the indirect method of adjustment (using the 2002 U.S. age-specific death rates as the standard), is equal to the 2002 direct adjusted death rate for U.S. white male population of 992.9 per 100,000 (NCHS 2004). The alternative hypothesis is that the rates differ. In symbols, the null and alternative hypotheses are

H 0 : θ = θ 0 = 0.009929 and H a : θ θ 0 .

The test statistic, z, for this hypothesis is

( θ ˆ - θ 0 ) / ( approximate standard error of θ ˆ )

where θ ˆ is 907.8 per 100,000, the 2002 indirect age-adjusted death rate for the American Indian/Alaskan Native male population. In Chapter 7 we found the approximation to the standard error of θ ˆ was 11 per 100,000. If this value of z is less than or equal to −1.96 (= z 0.025) or greater than or equal to 1.96 (= z 0.975), we reject the null hypothesis in favor of the alternative hypothesis. The value of z is

0.009078 - 0.009929 0.00011 = 7.74.

Since −7.74 is in the rejection region, we reject the null hypothesis in favor of the alternative hypothesis at the 0.05 significance level. There is sufficient evidence to suggest that the indirect age-adjusted death rate for the American Indian/Alaskan Native male population is significantly different from the U.S. white male rate. The p-value for this test is obtained by taking twice the probability that a z statistic is less than or equal to −7.74; the p-value is less than 0.00001.

As we have previously discussed, this test makes sense only if we view the American Indian/Alaskan Native population data as a sample in time or place.

The tests for the crude rate and for the adjusted rate obtained by the direct method of adjustment have the same form as the preceding.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780123694928500133

Distributions of Sampling Statistics

Sheldon M. Ross , in Introductory Statistics (Third Edition), 2010

Example 7.7

Suppose that exactly 46 percent of the population favors a particular candidate. If a random sample of size 200 is chosen, what is the probability that at least 100 favor this candidate?

Solution

If X is the number who favor the candidate, then X is a binomial random variable with parameters n = 200 and p = 0.46. The desired probability is P{X ≥ 100}. To employ the normal approximation, first we note that since the binomial is a discrete and the normal is a continuous random variable, it is best to compute P{X = i} as P{i – 0.5 ≤ Xi + 0.5} when applying the normal approximation (this is called the continuity correction ). Therefore, to compute P{X ≥ 100}, we should use the normal approximation on the equivalent probability P{X ≥ 99.5}. Considering the standardized variable

X 2 0 0 ( 0 . 4 6 ) 2 0 0 ( 0 4 6 ) ( 0 5 4 ) = X . 9 2 7 0 4 8 4

we obtain the following normal approximation to the desired probability:

P { X 1 0 0 } = P { X 9 9 . 5 } = P { X . 9 2 7 . 0 4 8 4 9 9 . . 5 9 2 7 . 0 4 8 4 } P { Z > 1 . 0 6 4 1 } = 0 . 1 4 4 ( from Table D . 1 or Program 6-1 )

The exact value of the desired probability could, of course, have been obtained from Program 5-1. Running this program shows that the exact probability that a binomial random variable with parameters n = 200 and p = 0.46 is greater than or equal to 100 is 0.1437. Thus, in this problem, the normal approximation gives an answer that is correct to three decimal places.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780123743886000077

R tutorial: statistical inference in R

Stephen C. Loftus , in Basic Statistics with R, 2022

17.3.2 Inference for two proportions

So that takes care of our one-sample test and confidence interval. What about the two-sample cases? We earlier said that the prop.test function could be used for two-sample tests and intervals, and ultimately it turns out that the code needed for our two-sample test is nearly identical. The arguments in this case are the successes in both samples x, the sample sizes n, the alternative hypothesis a l t e r n a t i v e , the continuity correction c o r r e c t , and our confidence level c o n f . l e v e l for our confidence interval—if so desired.

prop.test(x, n, alternative, correct, conf.level)

The important change here comes in our successes x and sample sizes n. Previously, they were single values as we only were concerned with a single sample. Here—as we have two groups to compare—both x and n will be vectors of values. It is important to ensure that the ordering of successes in x matches up with the ordering of sample sizes in n. Additionally, the alternative hypothesis and alternative option will be affected by this ordering. For example, the "greater" option implies H A : p 1 > p 2 , where group one—with population proportion p 1 —will be defined by the successes and sample size entered first into x and n. So we must make sure that the ordering of x and n matches up with what our alternative argument implies.

For example, let us look back at the example we walked through while learning the steps of our two-sample test for proportions [55]. In this example, the Pew Research Group asked 667 Millenials and 558 Generation Xers if they thought it was essential for the United States to be a world leader in space exploration. 467 Millenials and 407 Generation Xers answered "Yes" to the question. We wanted ultimately to test if there was any difference between the population proportions for those two groups. The hypotheses in this case would be

H 0 : p M i l l e n i a l p G e n X = 0 H A : p M i l l e n i a l p G e n X 0

leading to ." Here, our successes would be x = c ( 467 , 407 ) , and our sample sizes would be n = c ( 667 , 558 ) . All put together, the code would be

prop.test(x=c(467, 407), n=c(667, 558),

alternative="two.sided", correct=FALSE)

The resulting output for this code is given below. Again, our test statistic will be the positive or negative square root of X-squared: positive if p ˆ 1 > p ˆ 2 and negative if p ˆ 1 < p ˆ 2 . Since p ˆ 1 < p ˆ 2 in this case, our test statistic is the negative square root of X-squared, so 1.2707 = 1.127 . The p-value, determined by our test statistic and alternative hypothesis, is 0.2596, likely higher than our significance level.

2-sample test for equality of proportions without continuity

correction

data:   c(467, 407) out of c(667, 558)

X-squared = 1.2707, df = 1, p-value = 0.2596

alternative hypothesis: two.sided

95 percent confidence interval:

-0.07991559   0.02143408

sample estimates:

prop 1   prop 2

0.7001499 0.7293907

Just as in our one-sample case, we can find our ( 1 α ) 100 % confidence interval for p 1 p 2 by changing our conf.level options. Also as before, for prop.test to return the correct confidence interval, we need to set our alternative option to "two.sided" So, for our example, to find the 90% confidence interval for p M i l l e n i a l p X , all we need to add is conf.level=0.9 to our code to get the 90% confidence interval of (−0.07176842, 0.01328690).

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780128207888000304

Risks, Odds, and ROC Curves

R.H. Riffenburgh , in Statistics in Medicine (Third Edition), 2012

The Log in the Log Odds Ratio Test

Is the odds ratio (OR) large enough to indicate that the association between the two types of category is significant in probability? This is the first question addressed in this section. If we have estimated the level of association by the OR, we can go directly to a test using that value. The OR has a difficult, asymmetric distribution (as does the RR). To put it into a form with a known and usable probability distribution, the natural logarithm of the OR, the log odds ratio, which we will denote by L, is used. L is symmetric about 0, unlike the OR. The square of L divided by its standard deviation is distributed as chi-square with 1 df. (The chi-square test of log OR is not the same test as the chi-square test of contingency; they just both use the chi-square probability distribution.)

Example Posed: Significance of OR in Predicting a Biopsy Result

Using the method from Table 10.3 and the data from Table 10.6 giving DRE and biopsy counts, the OR is (68×89)/(117×27)=1.92. This OR is greater than the value of 1 which would indicate no association, but is 1.9 significant in probability?

Table 10.6. Contingency Table of Simultaneous Biopsy and DRE Results from 301 Patients

DRE Totals
1 0
Biopsy 1 n 11=68 n 12=27 n =95
0 n 21=117 n 22=89 n =206
Totals n ·1=185 n ·2=116 n=301

Method for the Log Odds Ratio Test

A test of the significance of 2×2 contingency requires the probability distribution of the measure. The log odds ratio, L, is one that can be put into a form having a chi-square distribution. Using the n notation introduced in Section 9.1 or 10.1, L is given by

(10.1) L = ln [ ( n 11 + 0.5 ) × ( n 22 + 0.5 ) ( n 12 + 0.5 ) × ( n 21 + 0.5 ) ] ,

where "ln" denotes natural logarithm. The 0.5 values are a continuity correction added to improve the approximation. The standard error of L is

(10.2) S E L = ( 1 n 11 + 0.5 ) + ( 1 n 12 + 0.5 ) + ( 1 n 21 + 0.5 ) + ( 1 n 22 + 0.5 ) .

To test L against a hypothesized log odds ratio λ (for example, H0: λ=0 implies the category types are independent), the quantity

(10.3) χ 2 = ( L λ S E L ) 2

may be looked up in the chi-square table, Table III, for 1 degree of freedom. The resulting p-value is the probability that such an association would occur by chance alone.

If the sample sizes (n-values) are large in every cell of the table, the 0.5 adjustments may be omitted.

Example Completed: Significance of OR in Predicting a Biopsy Result

L = ln [ ( n 11 + 0.5 ) × ( n 22 + 0.5 ) ( n 12 + 0.5 ) × ( n 21 + 0.5 ) ] = ln [ 68.5 × 89.5 27.5 × 117.5 ] = 0.6404.

Its standard error is

S E L = ( 1 n 11 + 0.5 ) + ( 1 n 12 + 0.5 ) + ( 1 n 21 + 0.5 ) + ( 1 n 22 + 0.5 ) = ( 1 68.5 ) + ( 1 27.5 ) + ( 1 117.5 ) + ( 1 89.5 ) = 0.2658.

The chi-square statistic to test against λ=0 is

χ 2 = ( L - λ S E L ) 2 = ( 0.6404 - 0 0.2658 ) 2 = 5.8049

with 1 degree of freedom. This chi-square value falls between 0.025 and 0.01, as seen in Table III, so we may say that the p-value is significant. The actual p-value for chi-square with 1 df calculated from a software package is 0.016. We have adequate evidence from the sample to conclude that DRE result is associated with biopsy result. For comparison, if we omit the 0.5 adjustments, χ 2=5.9107 and p=0.015, a negligible difference.

Additional Example: Radial Keratotomy Experience and Visual Acuity

In the additional example on radial keratotomy (RK) surgery9 met in Section 9.4, the ophthalmologist found that postoperative visual acuity and position in his surgical sequence were dependent. The OR, calculated from the formula in Table 10.3, is 0.26, which is much less than 1, suggesting a negative relationship: the greater the number of surgeries, the fewer the eyes with poor refraction. Is the association as indicated by the OR significant? The investigator substitutes data from Table 9.5 in Eqs (10.1), (10.2), and finally (10.3) to calculate

L = ln [ ( n 11 + 0.5 ) × ( n 22 + 0.5 ) ( n 12 + 0.5 ) × ( n 21 + 0.5 ) ] = ln [ 17.5 × 10.5 27.5 × 24.5 ] =- 1.2993

S E L = 1 n 11 + 0.5 + 1 n 12 + 0.5 + 1 n 21 + 0.5 + 1 n 22 + 0.5 = 1 17.5 + 1 27.5 + 1 24.5 + 1 10.5 = 0.4791

χ 2 = ( L - λ S E L ) 2 = ( 1.6881 - 0 0.2295 ) = 7.35.

From Table III, the critical value of χ 2 for α=0.05 for 1 df is 3.84. Since 7.35 is much larger than 3.84, he concludes that there is a significant association between the two factors. The actual p=0.007.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B978012384864200010X

Confidence Intervals

R.H. Riffenburgh , in Statistics in Medicine (Third Edition), 2012

Proportions Fall into Two Types

Proportions fall in the interval 0–1. However, methods must be divided into two types: cases in which the proportion lies toward the center of the interval away from the extremes 0 and 1, i.e. the central proportion, which may be thought of as the rate of occurrence of a common event, and cases in which the proportion lies very close to 0 or 1, i.e. the extreme proportion, which may be thought of as the rate of occurrence of a rare event. The reason is that they lead to different distributions (see later in Methods section).

Example Posed, Common Event: CI on Proportion Positive Biopsies

Of our 301 urology biopsies from DB1, 95 had positive results, yielding a sample proportion p=0.316. What is a reasonable range for positive rate? We want a confidence interval on the theoretical proportion π.

Example Posed, Rare Event: CI on Proportion Children's Lead Levels

Children with high lead levels are found in a certain hospital's catchment90. Of 2500 children sampled, 30 with high lead levels are found, yielding p=0.012. How far may a rate deviate from this p before the hospital administration suspects an atypical situation? We want a confidence interval on the theoretical proportion π.

Method

The confidence interval we seek here is on the theoretical but unknown population proportion π, which we estimate by the sample proportion p.

Common Event

In this case, π is not close to 0 or 1, but is nearer to 0.5. It has been shown that p is distributed binomial, approximated by the normal with sample mean μ=p and standard deviation σ = p ( 1 - p ) / n . The mean p and standard deviation σ are substituted in the confidence interval pattern Eq. (7.5). Specifically for 95% confidence, substitute in Eq. (7.6) to obtain

(7.10) P [ p - 1.96 × Ïƒ - 1 / 2 n < Ï€ < p + 1.96 × Ïƒ + 1 / 2 n ] = 0 .95,

where the 1/2n components are continuity corrections to improve the approximation.
Rare Event

In this case, π is very near to 0 or 1. p is distributed Poisson, approximated by the normal with standard deviation estimated as the smaller of σ = p / n or ( 1 - p ) / n . Again, p and σ are substituted in the confidence interval pattern of Eq. (7.5). Specifically for 95% confidence, substitution in Eq. (7.6) yields

(7.11) P [ p - 1.96 × Ïƒ < Ï€ < p + 1.96 × Ïƒ ] = 0 .95 .

Example Completed, Common Event: CI on Proportion Positive Biopsies

In this example, the mean p=0.316. The standard deviation σ is given by

σ = p ( 1 - p ) n = 0.316 × 0.684 301 = 0.0268.

By using Eq. (7.10), we bracket π with 95% confidence as

P [ p - 1.96 × Ïƒ - 1 / 2 n < Ï€ < p + 1.96 × Ïƒ + 1 / 2 n ] = P [ 0.316 - 1.96 × 0.0268 - 0.00166 < Ï€ < 0.316 + 1.96 × 0.0268 + 0.00166 ] = P [ 0.262 < Ï€ < 0.370 ] = 0. 95 .

We are 95% confident that the proportion of positive prostate biopsies in the population of patients presenting with urological problems lies between 26% and 37%.

Example Completed, Rare Event: CI on Proportion Children's Lead Levels

Because p=0.012, Ï€ is evidently close to 0, implying the Poisson distribution. σ = p / n = 0.012 / 2500 = 0.00219 . The hospital administration wants to be sure that it does not have too many high-lead children in its catchment and therefore chooses a 99% confidence interval. From Table 7.1, the 0.99 two-tailed 1−α yields a corresponding z of 2.576. Replacing the 1.96 in Eq. (7.11) with 2.576, we obtain

P [ p - 2.576 × Ïƒ < Ï€ < p + 2.576 × Ïƒ ] = P [ 0.012 - 2.576 × 0.00219 < Ï€ < 0.012 + 2.576 × 0.00219 ] = P [ 0.0064 < Ï€ < 0.0176 ] = 0. 99 .

By focusing on the right tail, the hospital administration may be 99.5% confident that no more than 1.8% of children in its catchment have high lead levels.

Additional Example: Patient Satisfaction with Anesthesia

In a study77 anesthetizing patients undergoing oral surgery by a combination of propofol and alfentanil, 89.1% of 110 patients rated the anesthetic as highly satisfactory or excellent. What are 95% confidence limits on Ï€, the proportion of the population satisfied with the anesthetic? Because Ï€ is not near 0 or 1, the normal approximation to the binomial is appropriate. p=0.891 and σ = 0.891 × 0.118 / 110 = 0.031 are substituted in Eq. (7.10):

P [ 0.891 - 1.96 × 0.031 - 1 / 220 < Ï€ < 0.891 + 1.96 × 0.031 + 1 / 220 ] = P [ 0.0826 < Ï€ < 0.956 ] = 0. 95 .

We are 95% confident that at least 83% of patients will be quite satisfied with the combination of propofol and alfentanil and at least 4% will not.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B978012384864200007X

Normal Approximations

Robert J. Boik , in Philosophy of Statistics, 2011

4.2 Normal Approximation to the Negative Binomial Distribution

For the second application, consider an infinite sequence of independent and identically distributed Bernoulli random variables, each with success probability θ. Again, denote the Bernoulli random variables as Y 1,Y 1,… ,Y . The value of Y i is 1 if the i th trial is a success and 0 otherwise. Let W be the number of failures before the first success (i.e., Y i = 1) occurs in the sequence. The random variable W is said to have a geometric distribution and its pmf is

P ( W = w ) = ( 1 θ ) w θ for w = 0 , 1 , , .

Now consider a sequence of independent and identically distributed geometric random variables, W 1,W 2,… ,W n. Denote the sum of the geometric random variables by T n . The random variable T n has the same distribution as the number of failures before the n th success occurs in a sequence of independent and identically distributed Bernoulli trials. The random variable T n is said to have a negative binomial distribution and its pmf is

f T n ( t ) = P ( T n = t ) = ( t + n 1 t ) θ n ( 1 θ ) t , for t = 0 , 1 , , .

It is readily shown that μ = def E ( W i ) = ( 1 θ ) / θ and σ 2 = def Var ( W i ) = ( 1 θ ) / θ 2 Accordingly, it follows from Theorem 1 that

T n n ( 1 θ ) / θ n ( 1 θ ) / θ 2 dist N ( 0 , 1 ) .

The exact pmf and the normal approximations to the pmf of T n for θ = 0.2 and n=   5, 10, 20, and 50 are displayed in Figure 2 . Table 1 displays the approximation errors. The normal approximation to the pmf was computed using the continuity correction illustrated in (6).

Figure 2. Normal Approximation to the Negative Binomial Distribution, θ = 0.2

The normal approximation to a negative binomial random variable can be used to make frequentist inferences about the value of the parameter, θ. Suppose that T n ∼ Negative Binomial(n,θ) for fixed n and unknown θ. It follows from Theorems 1 and 2 that

P [ | | T n n ( 1 θ ) / θ | 0.5 n ( 1 θ ) / θ 2 | z α / 2 ] = 1 α + O ( n 1 / 2 ) ,

where z α is the 100(1−α) percentile of N(0,1). A confidence interval with nominal confidence coefficient 1−α can be obtained by inverting the inequality. The result is

P ( L n , α θ U n , α ) = 1 α + O ( n 1 / 2 ) , where L n , α = n ( T n + 0.5 + n z α / 2 2 / 2 ) z α / 2 n ( T n + 0.5 ) ( T n + 0.5 + n ) + n 2 z α / 2 2 / 4 ( T n + 0.5 + n ) 2 , U n , α = n ( T n * + 0.5 + n z α / 2 2 / 2 ) + z α / 2 n ( T n * 0.5 ) ( T n * 0.5 n ) + n 2 z α / 2 2 / 4 ( T n * 0.5 + n ) 2 and T n * = { 1 if T n = 0 , T n otherwise . .

For example, if n = 20 and T n = 46 is observed, then the approximate 95% confidence interval is (0.18, 0.41). This interval is correct when θ = 0.2 because θ is captured by the interval.

The actual confidence coefficient that corresponds to the nominal 95% intervals can be obtained by computing the interval for each value of T n from 0 to ∞ and then summing the probability of T n over those intervals that capture θ. For example, if θ = 0.2, then the actual confidence coefficient (i.e., coverage) for nominal 95% intervals is 0.962, 0.960, 0.954, and 0.953 for sample sizes n = 5, n = 10, n = 20,and n = 50,respectively.

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780444518620500320

Testing Statistical Hypotheses

Sheldon M. Ross , in Introductory Statistics (Fourth Edition), 2017

9.5 Hypothesis Tests Concerning Population Proportions

In this section we will consider tests concerning the proportion of members of a population that possess a certain characteristic. We suppose that the population is very large (in theory, of infinite size), and we let p denote the unknown proportion of the population with the characteristic. We will be interested in testing the null hypothesis

H 0 : p p 0

against the alternative

H 1 : p p 0

for a specified value p 0 .

If a random selection of n elements of the population is made, then X, the number with the characteristic, will have a binomial distribution with parameters n and p. Now it should be clear that we want to reject the null hypothesis that the proportion is less than or equal to p 0 only when X is sufficiently large. Hence, if the observed value of X is x, then the p value of these data will equal the probability that at least as large a value would have been obtained if p had been equal to p 0 (which is the largest possible value of p under the null hypothesis). That is, if we observe that X is equal to x, then

p  value = P { X x }

where X is a binomial random variable with parameters n and p 0 .

The p value can now be computed either by using the normal approximation or by running Program 5-1, which computes the binomial probabilities. The null hypothesis should then be rejected at any significance level that is greater than or equal to the p value.

Example 9.8

A noted educator claims that over half the adult U.S. population is concerned about the lack of educational programs shown on television. To gather data about this issue, a national polling service randomly chose and questioned 920 individuals. If 478 (52 percent) of those surveyed stated that they are concerned at the lack of educational programs on television, does this prove the claim of the educator?

Solution

To prove the educator's claim, we must show that the data are strong enough to reject the hypothesis that at most 50 percent of the population is concerned about the lack of educational programs on television. That is, if we let p denote the proportion of the population that is concerned about this issue, then we should use the data to test

H 0 : p 0.50 versus H 1 : p > 0.50

Since 478 people in the sample were concerned, it follows that the p value of these data is

p  value = P { X 478 } when X  is binomial ( 920 , 0.50 ) = 0.1243 from Program 5-1

For such a large p value we cannot conclude that the educator's claim has been proved. Although the data are certainly in support of that claim, since 52 percent of those surveyed were concerned by the lack of educational programs on television, such a result would have had a reasonable chance of occurring even if the claim were incorrect, and so the null hypothesis is not rejected.

If Program 5-1 were not available to us, then we could have approximated the p value by using the normal approximation to binomial probabilities. Since n p = 920 ( 0.50 ) = 460 and n p ( 1 p ) = 460 ( 0.5 ) = 230 , this would have yielded the following:

p  value = P { X 478 } = P { X 477.5 } = P { X 460 230 477.5 460 230 } P { Z 1.154 } = 0.1242

Thus the p value obtained by the normal approximation is quite close to the exact p value obtained by running Program 5-1.

For another type of example in which we are interested in a hypothesis test of a binomial parameter, consider a process that produces items that are classified as being either acceptable or defective. A common assumption is that each item produced is independently defective with a certain probability p, and so the number of defective items in a batch of size n will have a binomial distribution with parameters n and p.

Example 9.9

A computer chip manufacturer claims that at most 2 percent of the chips it produces are defective. An electronics company, impressed by that claim, has purchased a large quantity of chips. To determine if the manufacturer's claim is plausible, the company has decided to test a sample of 400 of these chips. If there are 13 defective chips (3.25 percent) among these 400, does this disprove (at the 5 percent level of significance) the manufacturer's claim?

Solution

If p is the probability that a chip is defective, then we should test the null hypothesis

H 0 : p 0.02 against H 1 : p > 0.02

That is, to see if the data disprove the manufacturer's claim, we must take that claim as the null hypothesis. Since 13 of the 400 chips were observed to be defective, the p value is equal to the probability that such a large number of defectives would have occurred if p were equal to 0.02 (its largest possible value under H0). Therefore,

p  value = P { X 13 } where X  is binomial ( 400 , 0.02 ) = 0.0619  from Program undefined 5-1

and so the data, though clearly not in favor of the manufacturer's claim, are not quite strong enough to reject that claim at the 5 percent level of significance.

If we had used the normal approximation, then we would have obtained the following result for the p value:

p  value = P { X 13 } where X  is binomial ( 400 , 0.02 ) = P { X 12.5 } continuity correction = P { X 8 8 ( 0.98 ) 12.5 8 8 ( 0.98 ) } P { Z 1.607 } where Z  is standard normal = 0.054

Thus, the approximate p value obtained by using the normal approximation, though not as close to the actual p value of 0.062 as we might have liked, is still accurate enough to lead to the correct conclusion that the data are not quite strong enough to reject the null hypothesis at the 5 percent level of significance.

Once again, let p denote the proportion of members of a large population who possess a certain characteristic, but suppose that we now want to test

H 0 : p p 0

against

H 0 : p < p 0

for some specified value p 0 . That is, we want to test the null hypothesis that the proportion of the population with the characteristic is at least p 0 against the alternative that it is less than p 0 . If a random sample of n members of the population results in x of them having the characteristic, then the p value of these data is given by

p  value = P { X x }

where X is a binomial random variable with parameters n and p 0 .

That is, when the null hypothesis is that p is at least as large as p 0 , then the p value is equal to the probability that a value as small as or smaller than the one observed would have occurred if p were equal to p 0 .

9.5.1 Two-Sided Tests of p

Computation of the p value of the test data becomes slightly more involved when we are interested in testing the hypothesis

H 0 : p = p 0

against the two-sided alternative

H 1 : p p 0

for a specified value p 0 .

Again suppose that a sample of size n is chosen, and let X denote the number of members of the sample who possess the characteristic of interest. We will want to reject H0 when X / n , the proportion of the sample with the characteristic, is either much smaller or much larger than p 0 or, equivalently, when X is either very small or very large in relation to n p 0 . Since we want the total probability of rejection to be less than or equal to α when p 0 is indeed the true proportion, we can attain these objectives by rejecting for both large and small values of X with probability, when H0 is true, α / 2 . That is, if we observe a value such that the probability is less than or equal to α / 2 that X would be either that large or that small when H0 is true, then H0 should be rejected.

Therefore, if the observed value of X is x, then H0 will be rejected if either

P { X x } α 2

or

P { X x } α 2

when X is a binomial random variable with parameters n and p 0 . Hence, the significance-level-α test will reject H0 if

Min { P { X x } , P { X x } } α 2

or, equivalently, if

2 Min { P { X x } , P { X x } } α

where X is binomial ( n , p 0 ). From this, it follows that if x members of a random sample of size n have the characteristic, then the p value for the test of

H 0 : p = p 0 versus H 1 : p p 0

is as follows:

p  value = 2 Min { P { X x } , P { X x } }

where X is a binomial random variable with parameters n and p 0 .

Since it will usually be evident which of the two probabilities in the expression for the p value will be smaller (if x n p 0 , then it will almost always be the first, and otherwise the second, probability), Program 5-1 or the normal approximation is needed only once to obtain the p value.

Example 9.10

Historical data indicate that 4 percent of the components produced at a certain manufacturing facility are defective. A particularly acrimonious labor dispute has recently been concluded, and management is curious about whether it will result in any change in this figure of 4 percent. If a random sample of 500 items indicated 16 defectives (3.2 percent), is this significant evidence, at the 5 percent level of significance, to conclude that a change has occurred?

Solution

To be able to conclude that a change has occurred, the data need to be strong enough to reject the null hypothesis when you are testing

H 0 : p = 0.04 versus H 1 : p 0.04

where p is the probability that an item is defective. The p value of the observed data of 16 defectives in 500 items is

p  value = 2 Min { P { X 16 } , P { X 16 } }

where X is a binomial (500, 0.04) random variable. Since 500 × 0.04 = 20 , we see that

p  value = 2 P { X 16 }

Since X has mean 20 and standard deviation 20 ( 0.96 ) = 4.38 , it is clear that twice the probability that X will be less than or equal to 16—a value less than 1 standard deviation lower than the mean—is not going to be small enough to justify rejection. Indeed, it can be shown that

p  value = 2 P { X 16 } = 0.432

and so there is not sufficient evidence to reject the hypothesis that the probability of a defective item has remained unchanged.

Example 9.11

Identical, also called monozygotic, twins form when a single fertilized egg splits into two genetically identical parts. The twins share the same DNA set, thus they may share many similar attributes. However, since physical appearance is influenced by environmental factors and not just genetics, identical twins can actually look very different. Fraternal, also called dizygotic, twins develop when two separate eggs are fertilized and implant in the uterus. The genetic connection of fraternal twins is no more nor less the same as siblings born at separate times. The literature states that 28 percent of all twin pairs are identical twins.

Suppose that a hypothetical doctor interested in testing whether 28 percent was accurate has decided to gather data on twins born in the hospital in which the doctor works. However, in obtaining permission to run such a study she discovers that finding out whether a gender similar twin pair is monozygotic requires a DNA test, which is both expensive and requires the permission of the twin-bearing parents. To avoid this expense she reasons that if p is the probability that twins are identical, then the probability that they will be of the same sex can be easily derived. Letting SS be the event that a twin pair is of the same sex, then conditioning on whether the pair is identical or not gives

P ( S S ) = P ( S S | identical ) P ( identical ) + P ( S S | fraternal ) P ( fraternal ) = 1 ( p ) + 1 2 ( 1 p ) = 1 + p 2

where the preceding used that fraternal twins, being genetically the same as any pair of siblings, would have one chance in two of being of the same sex. Thus, if p = 0.28 , then

P ( S S ) = 1.28 2 = 0.64

Based on the preceding analysis the doctor has decided to test the hypothesis that the probability that a twin pair will be identical is 0.28 by testing whether the probability that a twin pair is of the same sex is 0.64. Assuming that data collected over one year by the researcher showed that 36 of 74 twin pairs were of the same sex, what conclusion can be drawn?

Solution

Let q be the probability that a twin pair is of the same sex. Then to test the hypothesis that 28 percent of all twin pairs are identical twins, the researcher will test the null hypothesis

H 0 : q = 0.64 versus H 1 : q 0.64

Now, the number of the 74 twin pairs that are of the same sex has a binomial distribution with parameters 74 and q. Hence, the p value of the test of H0 that results when 36 of 74 twin pairs are of the same sex is

p  value = 2 min { P { X 36 } , P { X 36 } }

where X is a binomial (74, 0.64) random variable. Because 74 × 0.64 = 47.36 , we see that

p  value = 2 P { X 36 }

Using the normal approximation yields

p  value = 2 P { X 36.5 } = 2 P { X 74 ( 0.64 ) 74 ( 0.64 ) ( 0.36 ) 36.5 74 ( 0.64 ) 74 ( 0.64 ) ( 0.36 ) } 2 P { Z 36.5 74 ( 0.64 ) 74 ( 0.64 ) ( 0.36 ) } p  value = 2 P { Z 2.630 } = 2 ( 1 P { Z 2.630 } ) = 0.0086

Thus the null hypothesis would be rejected at even the 1 percent level of significance.

Table 9.3 sums up the tests concerning the population proportion p.

Table 9.3. Hypothesis Tests Concerning p, the Proportion of a Large Population that Has a Certain Characteristic

The number of population members in a sample of size n that have the characteristic is X, and B is a binomial random variable with parameters n and p 0.
H0 H1 Test statistic TS p value if TS = x
P  p 0 p &gt; p 0 X P{B  x}
P  p 0 p &lt; p 0 X P{B  x}
P  = p 0 p p 0 X 2   Min{P{B  x},P{B  x}}

Read full chapter

URL:

https://www.sciencedirect.com/science/article/pii/B9780128043172000096