Use these problems to practice for your final exam. Good luck studying.

Problem 1.

Part (a)

This test does not require distributional assumptions. It uses ranks and is comparable to a paired t-test.

\(\bigcirc\) Mann-Whitney Test

\(\bigcirc\) Wilxocon Rank Sign Test

\(\bigcirc\) Bootstrap

\(\bigcirc\) Kruskal-Wallis Test

Part (b)

This method allows us to create confidence intervals based off of a simulated sampling distribution.

\(\bigcirc\) t-Test

\(\bigcirc\) Wilxocon Rank Sum Test

\(\bigcirc\) Bootstrap

\(\bigcirc\) Permutation Test

Part (c)

This method uses relabels to simulated the distribution under the null hypothesis.

\(\bigcirc\) Permutation Test

\(\bigcirc\) Kruskal-Wallis Test

\(\bigcirc\) Wilxocon Rank Sign Test

\(\bigcirc\) z-test

Part (d)

This nonparametric test is comparable to an ANOVA F-test.

\(\bigcirc\) Permutation Test

\(\bigcirc\) Kruskal-Wallis Test

\(\bigcirc\) Wilxocon Rank Sign Test

\(\bigcirc\) z-test

Problem 2.

The following problem cites this study (Mithoefer et al). You can learn more about the study’s data here.

The 2018 paper by Mithoefer et al studied the effect of MDMA (3,4-methylenedioxymethamphetamine) on military veterans, firefighters, and police officers with post-traumatic stress disorder. Each of the subjects (n=26) were given different doses of MDMA and a psychotherapy session, then had their Clinician-Administered PTSD scale score was measured.

Low dose MDMA Medium dose MDMA High dose MDMA
n=7 n=7 n=12
30 mg 75 mg 125 mg

The study wants to test their hypotheses about whether these 3 groups had the same mean Clinician-Administered PTSD scale score.

Here is another table for more information.

30 mg 75 mg 125 mg
Mean PTSD duration 68.9 58.3 110.9

Part (a)

The following is the start of a DAG for this study.

1. What is \(A\) in the study?
Your answer here.

2. What is \(Y\) in the study?
Your answer here.

3. What kind of study is this?
Your answer here.

4. What test should this study use to test their hypotheses?
Your answer here.

Part (b)

Can you tell if the assumptions for this test completely satisfied? Choose an answer, then elaborate in the space below the answer.

\(\bigcirc\) Yes

\(\bigcirc\) No

Elaborate here for part (a) here.

Part (c)

We have the following table from the paper about group composition.

30 mg 75 mg 125 mg
Men 5 6 8
Women 2 1 4

Use a formal testing procedure to test whether the distribution of men and the distribution of women amongst the groups were the same. Follow the steps.

Is this a \(\chi^2\) goodness-of-fit test or a \(\chi^2\) independence test?

\(\bigcirc\) Goodness-of-fit

\(\bigcirc\) Independence

Calculate the \(\chi^2\) test statistic.
Your answer here.

What are the degrees of freedom for this test?
Your answer here.

Shade in your p-value.
Your answer here.

Write code to calculate your p-value.
Your answer here.

Part (d)

Recall the study used an ANOVA test to find results. After the ANOVA test, they conducted pairwise t-tests afterward. Why would they do that?

Part (e)

After conducting corrected pairwise t-tests, the study found results that the (augmented) high dose 125 mg had significantly higher Clinician-Administered PTSD scale score results than the low dose group with a p-value of 0.01. Interpret this p-value. Is it statistically significant? What would you conclude?

Part (f)

And here is another table from the study. Do you feel comfortable generalizing this study to all with PTSD?

30 mg 75 mg 125 mg
White 6 4 12
Latino 1 1 0
Native American 0 1 0
Native American & white 0 1 0

Part (g)

Which Disney character does the DAG in Part (a) look like?

Problem 3.

Let’s throw it back to 2002.

The Warriors played and won in the 2018 playoffs (reread this sentence a few times over if you’ve not yet understood this). The following contingency table contains information about Steph Curry.

Stephen Curry is a basketball player on the Golden State Warriors (GSW) well-known for his impressive 3 point shot. During the 2018 playoffs, Curry’s performance was jawdropping. Thus, we wanted to set up the following table to inspect some stats. This table contains counts of points corresponding to the last 4 playoff games.

Points made by Points scored by 3pt shot All other points scored Totals
Stephen Curry 66 44 110
All other Warriors 87 y 354
Totals 153 z x

Part (a)

Based on the above and per your calculations, how many points total did GSW score during these 4 games?

Part (b)

What is the probability that Stephen Curry scored points from a 3 point shot?

Part (c)

What is the probability of all other Warriors scoring points from a 3 point shot?

Part (d)

Which probability does the value of \(y/z\) from the table represent? [1 pt]

\(\bigcirc \, \, \text{A.} \, \,\) Points were made by all other Warriors given the points were not scored from 3 point shots

\(\bigcirc \, \, \text{B.} \, \,\) Points scored were not from 3 point shots and the points were scored by all other Warriors

\(\bigcirc \, \, \text{C.} \, \,\) Points scored were not from 3 point shots given the points were scored by all other Warriors

Problem 4.

Arya and Brienne are both awesome warriors. They took upon themselves to take on students. As a competition, they tested their students and gave them a battle competency grade (out of 100).

This is a preview of the dataset.

variable value
arya 50.45960
brienne 81.83705
brienne 94.70960
arya 63.41272
brienne 86.47726
arya 86.32942
brienne 98.44278

Part (a)

What kind of plot is this?

Part (b)

What kind of plot is this?

We are interested in testing whether Arya’s students or Brienne’s students are more combat competent.

Part (c)

Write the relevant hypotheses.

Part (d)

Which tests can we NOT use to test these hypotheses?

\(\square\) Two sample z-test

\(\square\) Two sample t-test

\(\square\) Paired t-test

\(\square\) Permutation Test

\(\square\) Wilxocon Rank Sum Test

\(\square\) Wilxocon Rank Sign Test

Part (e)

We are going to use a permutation test to test these data. Do we have distributional assumptions to satisfy for this test?

Part (f)

Permutation tests require you to ____________ labels on your dataset to simulate a __________ distribution. To make statistical conclusions based on this dataset, we calculate the p-value which can be interpreted as the probability of _______________________________________________________________________________.

Part (g)

What is our observed difference between the groups?

## # A tibble: 2 x 2
##   variable `mean(value)`
##   <fct>            <dbl>
## 1 arya              67.2
## 2 brienne           89.9

Based on this simulated distribution, what do you expect our p-value to be?

Problem 5.

Part (a)

Why would you use a bootstrap confidence interval instead of a normal-based confidence interval for testing the following hypotheses for any arbitrary dataset?

\[ H_0: m=100 \]

versus

\[ H_1: m \neq 100 \]

where \(m\) is the true median of our population.

Part (b)

Which of the following distributions do you simulate/estimate in order to create a bootstrap confidence interval?

\(\bigcirc\) Distribution under the \(H_0\)

\(\bigcirc\) Distribution under the alternative hypothesis

\(\bigcirc\) Sampling distribution of \(m\)

\(\bigcirc\) Normal curve

Part (c)

Which of the functions is used when finding the upper and lower bound for a bootstrap confidence interval?

\(\bigcirc\) quantile()

\(\bigcirc\) bootstrap()

\(\bigcirc\) aov()

\(\bigcirc\) summary()

Problem 6.

Figure out the type of test you’re going to use based on the problem. Then, carry out the test.

Part (a)

We have data on the birth years of some presidents and their first people. Here is a random sample of that data.

president first_person
1924 1925
1882 1884
1946 1947
1843 1847
1890 1896
1917 1929
1795 1803
1857 1861
1809 1818
1913 1912

What kind of variables are in these columns?
Your answer here.

We are interested in knowing whether the president tends to be older than their first person. What hypothesis might we test? It may be helpful to have the following output to answer the question.

dim(presidents)
## [1] 44  2

presidents <- presidents %>% mutate(new_col=president-first_person)
ggplot(presidents, aes(x=new_col)) + 
  geom_histogram(binwidth=1, col="black", fill="gold2", lwd=0.2) +
  theme_minimal()

What tests can you use? (Hint: There’s more than one, but one will give you better results in this case.)

Part (b)

On Thursday mornings, an online shopper attempts to buy an item from the Supreme brand website. Say that probability of successfully purchasing an item on a given Thursday is 20%.

How many times per month do we expect the shopper to successfully order something?
Your answer here.

What is the probability that the shopper will successfully order an item three Thursdays in a row?
Your answer here.

What is the probability that the shopper will successfully order 2 items during the span of three Thursdays?
Your answer here.

Our shopper believes that it’s getting even more difficult to purchase an item off of the Supreme brand website lately. He and 30 of his friends decide to all try to purchase an item. Out of his group of friends and himself, 10 of them are able to purchase an item. Does the shopper have evidence that the probability of purchasing an item on a given Thursday is still 20%?
Your answer here.

Part (c)

We have conducted an ANOVA test between 5 different groups of friends and tested how quickly they could climb up a standard gym class rope. Our ANOVA test gave us a p-value of 0.0008.

How do we interpret the p-value?
Your answer here.

Can we tell which groups over/under-performed?
Your answer here.

Problem 7.

Here are a bunch of “pop” questions to test your knowledge.

Problem 8.

Do the Bill Nye question on page 3 of this document.

Problem 9.

You are testing

\[ H_0: \mu = 10 \]

versus

\[ H_1: \mu < 10 \]

with data from an underlying normal distribution. Your data are as follows.

dim(data)
## [1] 25  1
data %>% summarize(mean=mean(data))
##       mean
## 1 9.078532

Are we calculating a z or t statistic?
Your answer here.

What parameter(s) are relevant for the distribution that we plan to calcualte our p-value from? Give exact value(s).
Your answer here.

Problem 10.

You plan to ask a random sample of San Franciscans their opinion on whether coffee is the best beverage.

How many San Franciscans must be interviewed to estimate the population proportion to within 3 percentage points with 95% confidence? Use 0.5 as the conservative guess for \(p\).
Your answer here.

Would the sample size have to increase or decrease if we changed the desired margin of error from 3 percentage points to 2 percentage points? You do not have to calculate your answer.
Your answer here.

What would the sample size be if we wanted the width of our interval to be 6 percentage points?
Your answer here.

Problem 11.

What is statistical power?
Your answer here.

How can you increase power?
Your answer here.

It has been long recognized that there are only 2 elephant species: the Asian elephant and the African elephant. However, in recent years, scientists have concluded that African elephants have diverged into two different species. A wonderful scientific duo (and their 3 interesting children Debbie, Eliza, and Donnie) is driving their ComVee (communications vehicle) throughout Africa doing a documentary on the two African elephant species: the savanna elephants and forest elephants. By previous research, savanna elephant weights are normally distributed with a mean of 8,000 kg and a standard deviation of 1000kg. They have reason to believe that forest elephants weigh less. We believe that their average weight is at least about 1000 kg less.

Write the relevant hypotheses on the curiosity of forest elephant weight.
Your answer here.

How many randomly sampled, independent elephants would need to be safely/ethically measured for your study if you wanted to have \(\alpha=0.05\) and \(\text{Power}=0.8\)?
Your answer here.