Create a clean (not unnecessary output) and well-formatted RMarkdown file that answers the two problems below (note both problems contains multiple parts). Use the #, ## and ### features to separate parts of the document to ease in reading.
Problem 1 (20pts)
Data source: Ault, et. al.,(1967). “A Practical Approach to the Assessment of Head Retention of Bottled Beers,” Journal of The Institute of Brewing, pp. 558-566.
Don't use plagiarized sources. Get Your Custom Essay on
A Practical Approach to the Assessment of Head Retention of Bottled Beers
Get a plagiarism free paperJust from $13/Page
Figure source: https://www.micromatic.com/beer-questions/pressure-set-beer-regulator (链接到外部网站。)
Click on figure for zoomed in version
Description: Beer is a well known alcoholic carbonated beverage drank throughout the world. The carbonation in beer stems from carbon dioxide that is a byproduct of the fermentation process (yeast consume the sugars in wort (i.e., unfermented beer) to product alcohol and CO2) and may be added during the during the bottling or kegging process by forcing CO2 saturation. The amount of carbonation, temperature and pouring angle will result in the head that forms on a poured beer (see picture). An experiment was conducted to compare two different types of bottling methods in terms of their head retention. A pouring apparatus was built and a batch of beer was stored into 12 ounce bottles using one of two bottling techniques. Once the beers reached 70 degrees Fahrenheit they were carefully opened and poured into a clean glass using the apparatus. Three measures of head retention were recorded: “head” (the amount of foam that forms), “adhesion” (amount of head retained after 240 seconds), and “collapse” (percentage of head collapse in 30 seconds). For each of the two bottling techniques, 20 beers were measured.
The data are in the file beer_head.csv . Use these data to answer the following questions. |
 |
Part 1
Comment on the design of the experiment. Specifically state all the design elements in the context of the problem: the experimental units, the response variable(s), the factor and factor levels, the treatments, and the steps the experimenter took in an attempt to control for nuisance variation or confounding factors.
Part 2
Read in the data and build a new version of the dataset that is in a tall or long format (hint: pivot_longer() ). The new dataset will have three variables: the bottling method (1 or 2), the response variable considered (head, adhesion, collapse) and a value (the recorded response values, 166 74 87 180, etc…)
Part 3
Use the dataset from part 2 to generate a well-organized table of meaningful summary statistics by bottling method. The table should allow a reader to compare each of the response variables for the two bottling methods. Consider the examples from class and use the kable() function so the table is aesthetically pleasing, feel free to learn kableExtra (链接到外部网站。) if you wish). Comment on the results.
(If you cannot complete part 2, you may build three separate summary tables for partial credit)
Part 4
Use the dataset from part 2 and the faceting option in ggplot to build box plots, with overlayed means, of each response variable by bottling type. Comment on what you see, including comments on the average and variation in each of the responses. Make sure your plot is properly labeled and would be understandable to an outside viewer (that is, the labels and titles explain the context).
(If you cannot complete part 2, you may build three separate side-by-side boxplots for partial credit)
Part 5
Note: For the remaining questions we will only consider the response variable “head”, so use the original (wide) dataset for this analysis.
We wish to test if there is a significant difference between the head using the two bottling techniques. Is it appropriate to use an ANOVA to analyze this hypothesis? Why or why not?
Part 6
Conduct an appropriate test to determine if there is a significant difference between the head of beer from the two bottling methods. Make sure to state all conclusions in context referring to specific output.
Part 7
Should you test for multiple comparisons in this analysis? Why or why not?
Problem 2 (15pts)
| Data source: Meilgaard,(1960). “Hop Analysis, Cohumulone Factor and the Bitterness of Beer: Review and Critical Evaluation,” Journal of The Institute of Brewing, pp. 35-50.
Figure source: https://www.gaiaherbs.com/blogs/herbs/hops (链接到外部网站。)
The flower from the hop plant (pictured to the right) is a critical ingredient in the brewing of beers. In particular, alpha-acids from the flowers of hops (or simply the hops) provide bitterness and overall flavor to the beer. The time hops are included in the brewing process will help determine the bitterness of the beer. However, the amount of bitterness hops can contribute depends on the original alpha-acids in the hops, typically referred to as the dry alpha acid level (think of this as potential bitterness).
Each particular hop flower will provide a variable amount of alpha-acid (much like how each human is different), as will different hops from different varieties. An aspiring homebrewer sampled 10 hop flowers from bales of different hop varieties and calculated the alpha-acid level in each flower. The data is in the file hop_alpha_acid.csv . |
 |
Part 1
Is this an observational study or designed experiment? Briefly explain.
Part 2
Perform a complete statistical analysis on this data at the 1% significance level, including any necessary data handling, a meaningful/helpful EDA, the appropriate analysis with all assumption checking and any natural follow-up analysis.
Part 3
If the homebrewer was looking to make an especially bitter beer, which hop variety would you recommend? Justify based on the provided analysis.
Notes
- A new RMarkdown file may be created from scratch in RStudio by selecting File > New File > R Markdown…
- Use headers to separate each question part, and label them meaningfully (e.g. “Problem 1, Part 4”). See in-class Markdown examples of this and use them in your assignment.
- Look through the posted Rmd files in the first two modules on how to suppress extra output: warning=FALSE, message=FALSE.
- All questions must include written answers in full problem context. Submitting only a Markdown with compiled R code but no supporting answers will only receive limited credit.
- You will upload your final knitted HTML to Canvas for grade. Make sure you place your name and homework number in the Markdown header, e.g.
- title: “Homework #2”
- author: “Your Name Here”
- date: “September.., 2020”
- output: html_document
Reminder: Assignments in STA 363 are designed in such a way that we will be able to detect academic dishonesty. If you turn in another student’s generated Markdown document, we will know and proceed with an academic dishonesty claim.