Significance testing

One-tail test: Weighted die

One-tail test: Weighted die

Your friend gives you a single regular die, and say she is worried that it has been weighted to prefer the outcome of 2. She wants you to test it.

Design a significance test for the data of 20 rolls of the die to determine whether the die is weighted. Use significance level .

Solution

Let count the number of 2s that come up.

The Claim: “the die is weighted to prefer 2”
The null hypothesis : “the die is normal”

Assuming is true, then , and therefore:


⚠️ Notice that “prefer 2” implies the claim is for more 2s than normal.

Therefore: Choose a one-tail rejection region.

Need such that:


Solve for by computing conditional CDF values:

01234567
0.0260.1300.3290.5670.7690.8980.9630.989

Therefore, choose :

, but . Final answer:

Link to original

Two-tail test: Circuit voltage

Two-tail test: Circuit voltage

A boosted AC circuit is supposed to maintain an average voltage of with a standard deviation of . Nothing else is known about the voltage distribution.

Design a two-tail test incorporating the data of 40 independent measurements to determine if the expected value of the voltage is truly . Use .

Solution

Use as the decision statistic, i.e. the sample mean of 40 measurements of .

The Claim to test:

The null hypothesis :

Rejection region:

where is chosen so that


Assuming , we expect that:

Recall Chebyshev’s inequality:


Now solve:

Therefore the rejection region should be:

Link to original

One-tail test with a Gaussian: Weight loss drug

One-tail test with a Gaussian: Weight loss drug

Assume that in the background population in a specific demographic, the distribution of a person’s weight satisfies . Suppose that a pharmaceutical company has developed a weight-loss drug and plans to test it on a group of 64 individuals.

Design a test at the significance level to determine whether the drug is effective.

Solution

Since the drug is tested on 64 individuals, we use the sample mean as the decision statistic.

The Claim: “the drug is effective in reducing weight”

The null hypothesis : “no effect: weights on the drug still follow ”

Assuming is true, then .

⚠️ One-tail test because the drug is expected to reduce weight (unidirectional). Rejection region:


Calculate:

⚠️ Standardized is approximately normal!

(The standardization of removes the effect of . As if it’s the summation.)

So, standardize and apply CLT:


Solve:

Therefore, the rejection region:

Link to original

Binary hypothesis testing

ML test: Smoke detector

ML test: Smoke detector

Suppose that a smoke detector sensor is configured to produce when there is smoke, and otherwise. But there is background noise with distribution .

Design an ML test for the detector electronics to decide whether to activate the alarm.

What are the three error probabilities? (Type I, Type II, Total.)

Solution

First, establish the conditional distributions:

Density functions:


The ML condition becomes:


Therefore, is , while is .

The decision rule is: activate alarm when .


Type I error:

Type II error:

Total error:

Link to original

MAP test: Smoke detector

MAP test: Smoke detector

Suppose that a smoke detector sensor is configured to produce when there is smoke, and otherwise. But there is background noise with distribution .

Suppose that the background chance of smoke is . Design a MAP test for the alarm.

What are the three error probabilities? (Type I, Type II, Total.)

Solution

First, establish priors:

The MAP condition becomes:


Therefore, is , while is .

The decision rule is: activate alarm when .


Type I error:

Type II error:

Total error:

Link to original

MC Test: Smoke detector

MC Test: Smoke detector

Suppose that a smoke detector sensor is configured to produce when there is smoke, and otherwise. But there is background noise with distribution .

Suppose that the background chance of smoke is . Suppose the cost of a miss is the cost of a false alarm. Design an MC test for the alarm.

Compute the expected cost.

Solution

We have priors:

And we have costs:

(The ratio of these numbers is all that matters in the inequalities of the condition.)

The MC condition becomes:


Therefore, is , while is .

The decision rule is: activate alarm when .


Type I error:

Type II error:

Total error:


PMF of total cost:

Therefore .

Link to original