Midterm Project

In this project we will study the following problem: in a certain population of fish the length of the fin follows a normal distribution with standard deviation 1. The population consists of two distinct subgroups, called type A and type B. The fins of type A fish have a mean length of 0 (after standardizing) and the fins of type B fish have a length of μ (which is known). We have the length of the fins of n fish in the dataset fins but no information as to their type.
The probability model is of course the one discussed in class, namely
Z~Ber(p), Y1~N(0,1), Y2~N(μ,1) and X=(1-Z)Y1+ZY2

Problem 1 Use the available information to derive a hypothesis test for H0:p=p0 vs. H0:p≠p0 . Use your test for the data in fins to test H0:p=0.35 vs. H0:p≠0.35 using α=0.05 and μ=5

For a quick review of the relevant theory on hypothesis testing go here
(Hints: from the discussion in class we know that E[X]=pμ. Use this together with the central limit theorem.)

Problem 2 In problem 1 we used the CLT to derive a test. Here is another idea: we know a fish has a fin of mean length 0 or μ and the same standard deviation 1. so if we measure X<μ/2 the fish is more likely to be of type A, otherwise of type B. Use this to derive a test. Apply this test to the fins data.

Problem 3 Now we have two tests, and the question is which is better. For this write a routine that uses simulation to calculate the power of these tests. use your routine to plot the following graph: