library(palmerpenguins)
Attaching package: 'palmerpenguins'
The following objects are masked from 'package:datasets':
penguins, penguins_raw
data(penguins)Nicky Wakim
November 20, 2025
To see my math equations properly, you need to download the html file, then open it! One Drive does not show the math correctly!!
TRUE.
FALSE.
Not given
Partial: \(H_A\): There is an association between caffeinated coffee consumption and depression in women
Overall, the proportion of women who do and not suffer from depression are 0.05 and 0.95, respectively.
Expected count: 339.99
P-value is 0.0003269
Not given
Not given
TRUE.
TRUE.
FALSE.
FALSE.
Instead of doing part (b) - (f), please run a hypothesis test using the Chi-squared test.
Attaching package: 'palmerpenguins'
The following objects are masked from 'package:datasets':
penguins, penguins_raw
Make a dotplot of the penguins’ bill depths stratified by species type. Include points for the mean of each species type as well as a horizontal dashed line for the overall mean. See example from class for the plot I’m describing.
Investigate whether the technical conditions for using an ANOVA been satisfied.
Based on the figure, which pairs of species look like they have significantly different mean bill depths?
Write out in symbols or words the null and alternative hypotheses.
Using R, run the hypothesis test and display the output.
Using the values from the ANOVA table, verify (calculate) the value of the F statistic.
Based on the p-value, will we reject or fail to reject the null hypothesis? Why?
Write a conclusion to the hypothesis test in the context of the problem.
Vegetarian diet and cholesterol levels
When covering paired t-tests on Day 10 Part 2, the class notes used the example of testing whether a vegetarian diet changed cholesterol levels. The data are in the file chol213.csv at https://niederhausen.github.io/BSTA_511_F23/data/chol213.csv. In this exercise we will use non-parametric tests to test for a change and compare the results to the paired t-test.
What are the hypotheses for the signed-rank test (2-sided) in the context of the problem?
Run the (Wilcoxon) Signed-rank test in R. What is the p-value and how does it compare to the p-value of the sign test and the paired t-test (check the class notes for this)?
Do not do parts (b)-(c) in the book
expected() in R (you do not need to compute them using the formula).Run a Fisher’s Exact test. Include the hypotheses and a conclusion in the context of the problem.
body mass vs. flipper length
bill depth vs. flipper length
bill depth vs. bill length
body mass vs. flipper length
bill depth vs. flipper length
bill depth vs. bill length
Which pair of variables has the strongest association? Which has the weakest? Explain how you determined this.
Run the simple linear regression model for body mass vs. flipper length, and display the regression table output.
Write out the regression equation for this model, using the variable names instead of the generic \(x\) and \(y\), and inserting the regression coefficient values.
Write a sentence interpreting the intercept for this example. Is it meaningful in this example?
Write a sentence interpreting the slope for this example.