Question
R Script: ##########PART 2 START############################################################################## R code and explanation for data analysis 5 tprocedures. # Read in the dataset.beers = read.csv(file.choose(), header = TRUE) #
R Script:
##########PART 2 START############################################################################## R code and explanation for data analysis 5 tprocedures.
# Read in the dataset.beers = read.csv(file.choose(), header = TRUE)
# gives variable names.names(beers) # gives variable names.
# Make an appropriate visual display for abv.
hist(beers$abv, breaks = 50)
# Recall hist() makes a histogram, I have added the "breaks" soyou can see more detail in the data. # Add a title. # Add color and other aesthetics if you like. # See week 3 lessons or the script from Data Analysis #3.
# Calculate the mean and standard deviation. mean() andsd()# Again week 3 lessons or the script from Data Analysis#3.
# Perform a t test using the t.test() command. # The format is t.test(data, mu = mu_0, alternative ="alt") # where data is a quantitative variable mu_0 is the hypothesizedmean,# and alt is either "less", "greater" or "two.sided"(default).# See lesson 34 for an R code example for t.test() or week 5 moduleR tutorials.
##########PART 1 END#############################################################################
Data Set:
"","abv","ibu","id","name","style","brewery_id","ounces""1527",4.7,NA,1742,"White Zombie Ale","Witbier",331,12"1289",7.5,85,2159,"City of the Sun","American IPA",209,16"2202",7.2,NA,1841,"Alpha Blackback","American BlackAle",164,12"836",4.4,44,2558,"Moar","English India Pale Ale (IPA)",53,12"453",4.8,25,1851,"Cougar","American Blonde Ale",93,12"397",4.8,23,1228,"Mad Beach","American Pale WheatAle",360,12"1214",6.3,75,2000,"Fistful of Hops Orange","AmericanIPA",25,16"600",6,30,1936,"Farmer's Tan Red Ale","American Amber / RedAle",265,12"843",5.8,44,1896,"Aftermath Pale Ale","American Pale Ale(APA)",112,12"1557",4.8,NA,1446,"Great River Golden Ale","American BlondeAle",365,12"1407",2.7,NA,1286,"Bikini Beer","American IPA",173,12"551",4.9,29,567,"Churchkey Pilsner Style Beer","AmericanPilsner",526,12"1311",8,86,1346,"Habitus IPA","American IPA",423,16"672",4.8,35,890,"Payette Pale Ale","American Pale Ale(APA)",307,12"613",9,30,584,"Wee Muckle (2011)","Scotch Ale / WeeHeavy",25,16"971",5.6,55,1270,"Capital Trail Pale Ale","American Pale Ale(APA)",343,12"1889",5.7,NA,530,"Flagship IPA","English India Pale Ale(IPA)",179,12"1231",7.2,75,569,"Tocobaga Red Ale","American Amber / RedAle",141,12"1955",6,NA,2470,"Kreamed Corn","Cream Ale",24,12"1884",5.6,NA,1636,"Local 5 Pale Ale","American Pale Ale(APA)",355,16"2288",8.3,NA,2179,"Southern Cross","Flanders RedAle",204,19.2"1646",5,NA,1612,"Keeper (Current)","American Pilsner",363,12"812",5.2,42,1247,"Ray Ray?s Pale Ale","American Pale Ale(APA)",122,12"984",6.5,55,1599,"Royal Brat","Extra Special / Strong Bitter(ESB)",25,16"2250",8,NA,2120,"The Imperial Texan","American Double / ImperialIPA",161,16"996",4.3,60,2292,"Little Sister India Style Session Ale","AmericanIPA",170,12"1329",9.3,90,468,"Hop Box Imperial IPA","American Double /Imperial IPA",233,12"1629",5,NA,1658,"Cack-A-Lacky","American Pale Ale(APA)",347,12"172",6.8,16,2160,"Joey Wheat","American Pale WheatAle",24,16"287",4.9,20,1390,"Double D Blonde (2013)","American BlondeAle",198,12"781",5.5,40,2205,"Mountain Rescue Pale Ale","American Pale Ale(APA)",194,12"183",4.9,17,800,"21st Amendment Watermelon Wheat Beer(2006)","Fruit / Vegetable Beer",368,12"913",6,49,1906,"Driftwood Ale","Extra Special / Strong Bitter(ESB)",276,12"1839",5.5,NA,1811,"Marblehead","American Amber / RedAle",305,16"802",5.6,41,162,"Paddy Pale Ale","American Pale Ale(APA)",361,12"2140",6.8,NA,1433,"Hat Trick Hop IPA","American IPA",409,16"29",4,9,781,"Choc Beer (2003)","American Dark WheatAle",505,12"1408",3.5,NA,782,"Carolina Blonde Light (2005)","American BlondeAle",504,12"345",5,21,1428,"Tin Roof Watermelon Wheat","Fruit / VegetableBeer",152,12"1397",9.9,115,2471,"Hopkick Dropkick","American Double / ImperialIPA",24,12"1872",5.6,NA,1155,"Big Bend Hefeweizen","Hefeweizen",463,12"1381",8.2,103,2401,"Yellow Wolf Imperial IPA","American Double /Imperial IPA",117,12"510",5.2,27,2178,"Hawaiian Crow Porter","AmericanPorter",203,12"199",8.1,17,2104,"Apr? Shred","American Strong Ale",220,16"229",5.2,18,2673,"House Lager","Keller Bier / ZwickelBier",2,16"2254",8,NA,661,"Chaka","Belgian Strong Pale Ale",166,16"1916",5.8,NA,717,"Monkey Paw Oatmeal Pale Ale","American Pale Ale(APA)",514,16"210",4.5,18,1335,"Float Trip Ale","American BlondeAle",314,16"138",5.3,15,1281,"Samuel Adams Octoberfest","M?rzen /Oktoberfest",300,12"373",5,22,2055,"Killer Kolsch","K?lsch",236,12"1038",9.9,60,1049,"Bourbon Barrel Johan","EnglishBarleywine",25,16"2311",9,NA,2481,"Paris","Saison / Farmhouse Ale",10,16"226",5,18,406,"Snake River Lager","Vienna Lager",191,12"1838",5.5,NA,913,"Newburyport Pale Ale","American Pale Ale(APA)",495,12"2345",9.9,NA,2249,"Sanctified","Belgian Strong PaleAle",164,12"1858",5.5,NA,2035,"Kolschtal Eddy","K?lsch",33,16"168",5.3,16,1325,"Big Rod Coconut Ale","American BlondeAle",393,12"459",5.1,25,1410,"Sand Island Lighthouse","K?lsch",412,12"1313",8.5,86,747,"Old Grogham Imperial India Pale Ale(2012)","American Double / Imperial IPA",387,16"887",4.7,46,1494,"Fortunate Islands","American Pale WheatAle",209,16"1713",5.1,NA,727,"Shipyard Export","American BlondeAle",385,12"1440",4.2,NA,1818,"Keebarlin' Pale Ale","American Pale Ale(APA)",171,12"1891",5.7,NA,1642,"Bleeding Buckeye Red Ale","Extra Special /Strong Bitter (ESB)",352,16"77",4.4,12,1009,"Tallgrass Pub Ale","American BrownAle",45,16"153",4.2,16,2479,"Jammer","Gose",46,12"404",5.2,23,1268,"Rustic Red","Irish Red Ale",441,16"1688",5,NA,813,"Ambitious Lager","Munich HellesLager",499,16"929",6,50,1511,"Worthy Pale","American Pale Ale(APA)",199,12"753",5,38,1253,"Venture Pils","German Pilsener",75,12"539",5,28,769,"Harpoon Summer Beer (2012)","K?lsch",234,12"1808",5.5,NA,1287,"Hipster Ale (Two Roads Brewing)","American PaleAle (APA)",173,12"155",4.5,16,2412,"Deception","American Blonde Ale",112,12"222",5,18,1050,"The Lawn Ranger","Cream Ale",29,16"40",5.2,9,2151,"Onyx Black Ale","American Black Ale",131,12"1322",6.5,90,499,"Alphadelic IPA (2011)","AmericanIPA",198,12"41",3.7,10,2345,"Gansett Light","Light Lager",143,16"181",4.9,17,802,"Hell or High Watermelon Wheat (2009)","Fruit /Vegetable Beer",368,12"579",5.3,30,1775,"Autocrat Coffee Milk Stout","Milk / SweetStout",143,16"537",5,28,2427,"Suncaster Summer Wheat","American Pale WheatAle",105,12"56",5.6,10,108,"White Rascal","Witbier",37,12"732",5.7,36,560,"Persnickety Pale","American Pale Ale(APA)",190,12"785",5.5,40,145,"Silverback Pale Ale","American Pale Ale(APA)",424,12"1349",9.5,98,804,"Ten Fidy Imperial Stout (2008)","RussianImperial Stout",503,12"1459",4.4,NA,1043,"North Fork Lager","American PaleLager",307,12"1588",4.9,NA,1457,"Chronic Ale","American Amber / RedAle",370,16"2090",6.5,NA,900,"Celestial Blonde Ale","American BlondeAle",301,16"1504",4.5,NA,2455,"Lionshead","American Pilsner",90,12"1589",4.9,NA,715,"Long Day Lager","Czech Pilsener",475,12
Part 3. (8 points) The microbeers.csv dataset is a random sample of 88 microbrews from around the United States. The variable abv represents the percent of alcohol by volume for each craft beer. According to the National Institute of Health, one standard serving of alcohol is 12 ounces of regular beer, which is usually about 5% alcohol by volume (abv). Does the sample of microbrews provide evidence the average alcohol by volume of all craft beers is different from a standard serving of beer at 5% abv? Use this dataset and the R script DA5_t_procedures.R to complete the following: a. (0.5 point) What is the parameter of interest in this scenario? Provide the symbol and context. b. (1 point) State the null and alternative hypothesis to answer the question of interest. c. (1.5 point) Make a histogram or boxplot to visualize the variable abv. Is there visual evidence the average alcohol by volume is different than 5%? d. (1 point) Check the conditions for inference. State them and whether they are met. e. (1 point) Use the t.test() command in R to perform the test. Paste your results. f. (3 points) From the R output, write a four-part conclusion describing the results. Use a = 0.05. Provide a statement in terms of the alternative hypothesis. State whether (or not) to reject the null. Give in context an interpretation of the point and interval estimate. Include any other information you might feel to relevant. H Source on Save 1 ##########PART 2 START 2 3 # Read in the dataset. 4 beers = read.csv(file.choose(), header = TRUE) 5 6 #gives variable names. 9 Run #######*************************************************************######### # R_code and explanation for data analysis 5 t procedures. 7 names (beers) # gives variable names. 8 978 12 13 14 10 11 # Make an appropriate visual display for abv. hist(beers$abv, breaks = 50) 15 #Recall hist() makes a histogram, I have added the breaks so you can see more detail in the data. # Add a title. 16 17 # Add color and other aesthetics if you like. 18 #See week 3 lessons or the script from Data Analysis # 3. 19 20 21 22 23 24 25 # Calculate the mean and standard deviation, mean() and sd() #Again week 3 lessons or the script from Data Analysis #3. # Perform a t test using the t.test() command. # The format is t.test(data, mu = mu_0, alternative = alt ) 28 29 - ##########PART 1 END 30 31 #where data is a quantitative variable mu_0 is the hypothesized mean, 26 # and alt is either less , greater or two.sided (default). 27 # See lesson 34 for an R code example for t.test() or week 5 module R tutorials. ###***********************************************************************### ############ Sourc
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Dynamic process modeling is a type of process modeling that captures timedependent behaviors meaning it takes into account how the process changes ove...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started