Quiz-Ch10-quakes-FA23

pdf

School

East Los Angeles College *

*We aren’t endorsed by this school

Course

3020

Subject

Physics

Date

Dec 6, 2023

Type

pdf

Pages

8

Uploaded by christiancastilla23

Report
Quiz-Ch10-quakes-FA23 November 7, 2023 # Quiz Ch. 1-10: Explaining Variation in Earthquake Magnitude [3]: # Run this code to load the required packages suppressMessages ( suppressWarnings ( suppressPackageStartupMessages ({ library (mosaic) library (supernova) library (coursekata) }))) Hello wonderful students. I’m confident you can do this! Please remember to read every word of each question. If you have time after you finish, I highly recomend taking a minute to look back over your work. In R, there is a data frame called quakes (Preloaded in R) which gives information about the earthquakes around Fiji since 1964. Variables in the data frame: lat Latitude of the location of the quake; around Fiji, smaller numbers (more negative) indicate south while larger numbers (less negative) are north. long Longitude of the location of the quake; around Fiji, smaller numbers indicate west and larger numbers indicate east. depth Distance in kilometers away from the earth’s surface. mag Richter Magnitude stations Number of earthquake observation stations reporting the earthquake [ ]: 0.1 Question 1 How many variables are in this data frame? What are the cases/observations? [7]: quakes 1
A data.frame: 1000 × 5 lat long depth mag stations <dbl> <dbl> <int> <dbl> <int> -20.42 181.62 562 4.8 41 -20.62 181.03 650 4.2 15 -26.00 184.10 42 5.4 43 -17.97 181.66 626 4.1 19 -20.42 181.96 649 4.0 11 -19.68 184.31 195 4.0 12 -11.70 166.10 82 4.8 43 -28.11 181.93 194 4.4 15 -28.74 181.74 211 4.7 35 -17.47 179.59 622 4.3 19 -21.44 180.69 583 4.4 13 -12.26 167.00 249 4.6 16 -18.54 182.11 554 4.4 19 -21.00 181.66 600 4.4 10 -20.70 169.92 139 6.1 94 -15.94 184.95 306 4.3 11 -13.64 165.96 50 6.0 83 -17.83 181.50 590 4.5 21 -23.50 179.78 570 4.4 13 -22.63 180.31 598 4.4 18 -20.84 181.16 576 4.5 17 -10.98 166.32 211 4.2 12 -23.30 180.16 512 4.4 18 -30.20 182.00 125 4.7 22 -19.66 180.28 431 5.4 57 -17.94 181.49 537 4.0 15 -14.72 167.51 155 4.6 18 -16.46 180.79 498 5.2 79 -20.97 181.47 582 4.5 25 -19.84 182.37 328 4.4 17 ￿ ￿ ￿ ￿ ￿ -25.79 182.38 172 4.4 14 -23.75 184.50 54 5.2 74 -24.10 184.50 68 4.7 23 -18.56 169.05 217 4.9 35 -23.30 184.68 102 4.9 27 -17.03 185.74 178 4.2 32 -20.77 183.71 251 4.4 47 -28.10 183.50 42 4.4 17 -18.83 182.26 575 4.3 11 -23.00 170.70 43 4.9 20 -20.82 181.67 577 5.0 67 -22.95 170.56 42 4.7 21 -28.22 183.60 75 4.9 49 -27.99 183.50 71 4.3 22 -15.54 187.15 60 4.5 17 -12.37 166.93 291 4.2 16 -22.33 171.66 125 5.2 51 -22.70 170.30 69 4.8 27 -17.86 181.30 614 4.0 12 -16.00 184.53 108 4.7 33 -20.73 181.42 575 4.3 18 2
5; Earthquakes surrounding Fiji since 1964 0.2 Question 2 For this lab, our outcome variable is magnitude (how big the earthquake was). Make some pre- sentable plots to explore which of the other variables best explain the variation in mag . Which variable looks like it explains variation in magnitude based on just the plots? What about the plot made you think that variable is the best at explaining variation in magnitude? [4]: gf_histogram ( ~ mag, data = quakes) %>% gf_boxplot ( -1 ~ mag) gf_histogram ( ~ lat, data = quakes) %>% gf_boxplot ( -1 ~ lat) 3
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
0.3 Question 3 A geoscientist notes that there is a large marine trench, a deep groove in the ocean, on the eastern side of Fiji called the Tonga Trench. The scientist has a hypothesis that because of the trench, earthquakes east of Fiji (those that have a larger longitude) have a smaller magnitude. We will call this the longitude hypothesis. Write a word equation for this hypothesis. (Only use variable names in your word equation) mag = long + error [ ]: 0.4 Question 4 Using the above longitude hypothesis, write the best fitting model in GLM notation. [23]: empty_model <- lm (mag ~ long, data = quakes) empty_model Call: lm(formula = mag ~ long, data = quakes) 4
Coefficients: (Intercept) long 6.68148 -0.01148 Yi = 6.7-0.01 + ei 0.5 Question 5 What does the 𝑏 0 and 𝑏 1 in the best fitting longitude model above mean? b0 = 6.7, when number of magnitude is higher, those with a lower longitude are likely to have a high magnitude. b1 = -0.01, for every distance that increase the longitude taken, we get a -0.06 decrease in quakes magnitude 0.6 Question 6 In the scatterplot below, which line represents the empty model (line A or line B)? Which line represents the longitude model (line A or line B)? Line A represents the Longitude Model Line B represents empty model 0.7 Question 7 When we look at a visualization and think – yeah, this one looks like there is a relationship between longitude and magnitude – which parameter estimate best represents the “relationship”: 𝑏 0 or 𝑏 1 ? Why? I believe b1 makes a good representation in this relationship because as the longitude icreases, the magnitude of the quakes gets smaller. More b1 Negative = larger distance resulting in smaller mag. 0.8 Question 8 What is our best estimate of 𝛽 1 ? Is it possible that this estimate is wrong? If so, why? -0.01; it is possible that it is wrong because of error and potential inaccuracies to the models. 0.9 Question 9 If there was no relationship between longitude and magnitude in the DGP, what would be the true 𝛽 1 ? the true B1 would be lat. [20]: lat_model <- lm (mag ~ lat, data = quakes) lat_model Call: lm(formula = mag ~ lat, data = quakes) 5
Coefficients: (Intercept) lat 4.536969 -0.004042 -0.004 0.10 Question 10 Interpret the F and PRE for the longitude model. [16]: supernova (empty_model) Analysis of Variance Table (Type III SS) Model: mag ~ long SS df MS F PRE p ----- --------------- | ------- --- ----- ------ ----- ----- Model (error reduced) | 4.854 1 4.854 30.815 .0300 .0000 Error (from model) | 157.210 998 0.158 ----- --------------- | ------- --- ----- ------ ----- ----- Total (empty model) | 162.064 999 0.162 F = 30.81 tells us that our model is 30.81 times better than the empty model PRE = .03 tells us that this model reduces 3% more error than the empty model 0.11 Question 11 Is our sample 𝑏 1 considered likely or unlikely? likely 0.12 Question 12 What is the correlation in the longitude hypothesis? Describe the relationahip. the more negative the result (long) is, the less likely the magnitude will be 0.13 Question 13 What is the p-value for the longitude hypothesis? Interpret the p-value for this hypothesis. [ ]: 0.14 Question 14 Does this data analysis mean that if we look at other islands (that are not Fiji), that there are lower magnitude earthquakes east of those islands? Why or why not? Think critically about this one. Think about the context. 6
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
No because without previous data of the history of earthquakes on other islands we cannot conclude that there will be a lower magnitude of earthquakes 0.15 Extra Credit Using analysis of variance (ANOVA), compare the above longitude hypothesis to each of the other varibales in this dataset. Which one is the best fitting model? Why? [27]: supernova (empty_model) supernova (lat_model) depth_model <- lm (mag ~ depth, data = quakes) supernova (depth_model) stations_model <- lm (mag ~ stations, data = quakes) supernova (stations_model) Analysis of Variance Table (Type III SS) Model: mag ~ long SS df MS F PRE p ----- --------------- | ------- --- ----- ------ ----- ----- Model (error reduced) | 4.854 1 4.854 30.815 .0300 .0000 Error (from model) | 157.210 998 0.158 ----- --------------- | ------- --- ----- ------ ----- ----- Total (empty model) | 162.064 999 0.162 Analysis of Variance Table (Type III SS) Model: mag ~ lat SS df MS F PRE p ----- --------------- | ------- --- ----- ----- ----- ----- Model (error reduced) | 0.413 1 0.413 2.548 .0025 .1108 Error (from model) | 161.651 998 0.162 ----- --------------- | ------- --- ----- ----- ----- ----- Total (empty model) | 162.064 999 0.162 Analysis of Variance Table (Type III SS) Model: mag ~ depth SS df MS F PRE p ----- --------------- | ------- --- ----- ------ ----- ----- Model (error reduced) | 8.621 1 8.621 56.070 .0532 .0000 Error (from model) | 153.443 998 0.154 ----- --------------- | ------- --- ----- ------ ----- ----- 7
Total (empty model) | 162.064 999 0.162 Analysis of Variance Table (Type III SS) Model: mag ~ stations SS df MS F PRE p ----- --------------- | ------- --- ------- -------- ----- ----- Model (error reduced) | 117.417 1 117.417 2624.656 .7245 .0000 Error (from model) | 44.647 998 0.045 ----- --------------- | ------- --- ------- -------- ----- ----- Total (empty model) | 162.064 999 0.162 based on PRE and F ratio stations would be the best. You made it to the end! Congrats!!! I know you want to get out of here and get on with your day, but I highly recomend taking a minute to look back over the questions and your answers. Trust me :) If you’re done, have a wonderful rest of your day! Treat yourself to your favorite meal, you deserve it. See you Thursday! 8