Math 152 - Statistical Theory - Homework 10
Important Note:
You should work to turn in assignments that are clear, communicative, and concise. Part of what you need to do is not print pages and pages of output. Additionally, you should remove these exact sentences and the information about HW scoring below.
Click on the Knit to PDF icon at the top of R Studio to run the R code and create a PDF document simultaneously. [PDF will only work if either (1) you are using R on the network, or (2) you have LaTeX installed on your computer. Lightweight LaTeX installation here: https://yihui.name/tinytex/]
Either use the college’s RStudio server (https://rstudio.pomona.edu/) or install R and R Studio on to your personal computer. See: https://m152-stat-theory.netlify.app/syllabus.html for resources.
Assignment
Goals:
In this assignment, the fun will include:
- size, power, and p-values
- simple vs simple test
- most powerful tests
Book problems
- Feel free to do the book problems with a pencil or in LaTeX (RMarkdown supports writing mathematics using LaTeX).
- If you use a pencil, you can take a picture of the problem(s), and include the image(s) using (remove the tick marks to make it work):

Note that myimage.jpeg needs to live in the same folder as the relevant .Rmd file (maybe you called the folder “math 152 hw” and put it on your desktop?)
Saving as jpg, jpeg, png, or pdf should work, but make sure to specify the exact name of the file.
If you have the 3rd edition of the book, the problems will be the same unless they don’t exist – that is, the 4th edition added problems but didn’t change the order of them. Ask me if you want to see the 4th edition problems.
Assignment
1: Community Q
Describe one thing you learned (not from lecture, maybe from working in pairs during class) from a member of the class (student, mentor, professor) – it could be: content, logistical help, background material, R information, etc. 1-3 sentences.
2: 9.1.13
Let
Let
Note: in R use ppois().
3: 9.1.14
Let
Let
- Show that
is a decreasing function of . - Find
in order to make have size . - Let
, , and . Find the precise form of the test and sketch its power function.
Note:
4: 9.1.15
Let
We shall consider test procedures of the form “reject
5: 9.2.2
Consider two pdfs
and
Suppose that a single observation
- Describe a test procedure for which the value of
is a minimum. - Determine the minimum value of
attained by that test procedure.
Convince yourself that the theorems in 9.2 hold.
6: 9.2.4
Consider again the conditions of Exercise 9.2.2, but suppose now that it is desired to find a test procedure for which
- Describe the test procedure.
- Determine the minimum value of
attained by the test procedure.
Convince yourself that the theorems in 9.2 hold.
7: 9.2.7
Suppose that
- Show that among all test procedures for which
, the value of is minimized by a test procedure that rejects when .
- For
, find the value of the constant that appears in part a.
8: 9.2.8
Suppose that a single observation X is taken from the uniform distribution on the interval
- Show that there exists a test procedure for which
and . - Among all test procedures for which
, find the one for which is a minimum.
9: R - kissing the right way
Most people are right-handed and even the right eye is dominant for most people. Molecular biologists have suggested that late-stage human embryos tend to turn their heads to the right. German biopsychologist Onur Güntürkün conjectured that this tendency to turn to the right manifests itself in other ways as well, so he studied kissing couples to see if both people tended to lean to their right more often than to their left (and if so, how strong the tendency is). He and his researchers observed couples from age 13 to 70 in public places such as airports, train stations, beaches, and parks in the United States, Germany, and Turkey. They were careful not to include couples who were holding objects such as luggage that might have affected which direction they turned. In total, 124 kissing pairs were observed with 80 couples leaning right (Nature, 2003). [Taken from Rossman & Chance, ISCAM]
Güntürkün wanted to test the belief that the probability of kissing to the right is 3/4; he thinks it is probably less than 3/4.
- Using the binomial distribution (not the CLT), find the rejection region for this test given a level of significance of 0.05. You can use trial and error (with
pbinom()) or the quantile function for the binomial (qbinom()) to come up with your test.
# for X ~ Bin(size, prob)
size=124
prob=.75
q=2
p=.1
pbinom(q, size, prob) # gives P(X < = q)[1] 1.525648e-70
dbinom(q, size, prob) # gives P(X=q)[1] 1.517401e-70
qbinom(p, size, prob) # gives the cutoff for a given probability, p[1] 87
What is the size of your test?
Calculate and plot the power function over all possible values of
. Do you think your test seems particularly powerful? Explain. (Note: you’ll need to change the code below to sayeval = TRUEand also actually write out the power function.)
all.theta <- seq(0,1,.001)
all.power <- #somefunction of all.theta and n (size)#
plot(all.theta, all.power, xlab="possible theta values", ylab="power function")- Given the data (80 couples kissed right), what is the p-value of the test?