Question

Question 5 [Avec R Consider the dataset faithful_data.txt. It contains the times between eruptions for Old Faithful, a Geiser in Yellowstone national park (a). Plot a histogram of the dataset and describe it. (b). Fit a normal distribution. (c). Use a QQ-plot to check if your fitted model is appropriate

Use R to solve.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

(a).

install.packages("fitdistrplus")
library(fitdistrplus)
head(faithful)
duration=faithful$eruptions
hist(duration, right=FALSE, col=colors, main="Old Faithful Eruptions", xlab="Duration minutes")

Old Faithful Eruptions w 寸 2 4 Duration minutes

(b)

FIT <- fitdist(duration,"norm")
class(FIT)
summary(FIT)

Fitting of the distribution ' norm ' by maximum likelihood
Parameters :
estimate Std. Error
mean 3.487783 0.06907846
sd 1.139271 0.04884568
Loglikelihood: -421.417 AIC: 846.8341 BIC: 854.0457
Correlation matrix:
mean sd
mean 1.000000e+00 4.795005e-11
sd 4.795005e-11 1.000000e+00

A normal distribution is fitted with the given data

(c)

plot(FIT)

Empirical and theoretical denS Q-Q plot LO 0 1 23 5 6 7 Data Theoretical quantiles Empirical and theoretical CDFs P-P plot 寸 0寸 0.2 0.4 0.6 0.8 Data Theoretical probabilities

From the QQ-plot we see that the normal fitting of the data was inappropriate since the quantile plots of the data versus the fitted normal distribution make a curved line. If it was a somewhat straight line, our assumption of normal fitting would have been correct.

Add a comment
Know the answer?
Add Answer to:
Use R to solve. Question 5 [Avec R Consider the dataset "faithful_data.txt". It contains the times...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Question 6 [Avec R] Consider the following dataset that has a volatility measure for 30 stocks...

    Question 6 [Avec R] Consider the following dataset that has a volatility measure for 30 stocks 0.5974090 5.7420023 9.5334667 2.0089723 38.6716167 3.9366327 27.7419840 5.6029157 3.5437040 0.8317833 1.6134417 18.1795990 32.8353140 1. 1497677 8.1007240 4.3894207 3.8839490 2.4667357 9.0249373 7.2506833 2.7767457 2.0062077 0.8373807 3.3444917 1.8748643 7.0183583 8.9134893 0.8701540 2.4200127 9.8454307 (a). Plot a histogram of the dataset and describe it (b). Fit a normal distribution. Use a QQ-plot to check if your fitted model is appropriate. (c). Another distribution to consider is the...

  • 5. The data below represent duration times in seconds) of eruptions and time intervals (in minutes)...

    5. The data below represent duration times in seconds) of eruptions and time intervals (in minutes) to the next eruption for randomly selected eruptions of the Old Faithful geyser in Yellowstone National Park. Duration 242 255 227 251 262 207140 Interval After 91 81 91 92 102 94 91 a. Find the regression equation. b. Construct a residual plot for the data. Use the table below to guide you. y-9 Point on Plot Y c. Is a linear model appropriate...

  • Problem 6 [Avec R] Download the 'heightweight.csv' dataset from CANVAS. This contains 25000 entries of height...

    Problem 6 [Avec R] Download the 'heightweight.csv' dataset from CANVAS. This contains 25000 entries of height and weight from some sample of the population after a survey. (a). Draw a histogram for both height and weight using R (b). Draw a smoothed histogram for both height and weight using R. The function density' will help (c). Draw a scatter plot for height and weight. (d). Say your friend Bill was frustrated with his short stature and would like to grow...

  • Answer the following question by showing the codes in R 2. Consider the dataset mtcars and...

    Answer the following question by showing the codes in R 2. Consider the dataset mtcars and suppose we are interested in modeling the mpg of a vehicle based on a single variable presented in the dataset. a) Use the cor ) function in R, apply it to only numerical variables in the dataset. Identify the numerical variable that shows the most significant correlation, and generate a scatterplot between this variable and mpg. b) Use the 1m() function in R to...

  • The U.S. Geological Survey compiled historical data about Old Faithful Geyser (Yellowstone National Park) from 1870...

    The U.S. Geological Survey compiled historical data about Old Faithful Geyser (Yellowstone National Park) from 1870 to 1987. Let x1 be a random variable that represents the time interval (in minutes) between Old Faithful eruptions for the years 1948 to 1952. Based on 9780 observations, the sample mean interval was x1 = 63.4 minutes. Let x2 be a random variable that represents the time interval in minutes between Old Faithful eruptions for the years 1983 to 1987. Based on 23,585...

  • USE R STUDIO The stackloss data frame available in R contains 21 observations on four variables...

    USE R STUDIO The stackloss data frame available in R contains 21 observations on four variables taken at a factory where ammonia is converted to nitric acid. The first three variables are Air.Flow, Water.Temp, and Acid.Conc. The fourth variable is stack.loss, which measures the amount of ammonia that escapes before being absorbed. Read the help file for more information about this data frame. - Give a numerical summarization of each column of the dataset, then use boxplots to help illustrating...

  • Help with coding in R: cyl<-factor(scan(text= "6 6 4 6 8 6 8 4 4 6...

    Help with coding in R: cyl<-factor(scan(text= "6 6 4 6 8 6 8 4 4 6 6 8 8 8 8 8 8 4 4 4 4 8 8 8 8 4 4 4 8 6 8 4")) am<-factor(scan(text= "1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1")) ## 1)## Using the data `cyl` and `am` (transmission...

  • 1. (R) An interior automotive supplier places several electrical wires in a harness. A pull test...

    1. (R) An interior automotive supplier places several electrical wires in a harness. A pull test measures the force required to pull spliced wires apart. A customer requires that each wire that is spliced into the harness withstand a pull force of 20 pounds. Let X be a random variable representing the pull force required to pull a spliced wire apart. The following are 20 observations of X 28.8 24.4 30.1 25.6 26.4 23.9 22.1 22.5 27.6 28.1 20.8 27.7...

  • NOTE: DO PART c) ONLY PLEASE INCLUDE THE R CODES ALONG WITH THE PLOTS 4. Let...

    NOTE: DO PART c) ONLY PLEASE INCLUDE THE R CODES ALONG WITH THE PLOTS 4. Let XI, . .. , Xn be a random sample from the inverse Gaussian distribution. IG(μ, λ), whose pdf is (a) Show that the MLE of μ and λ are μ-X and (b) It is known that nA/λ ~ χ2-1. Use this to derive a 100-(1-a)% CI for λ (c) (R) Consider the following dataset 10.6, 91.3, 51.7, 2.2, 3.8, 6.0, 17.8, 131.8, 31.0, 4.2,...

  • NOTE: DO PART c) ONLY PLEASE INCLUDE THE R CODES ALONG WITH THE PLOTS 4. Let...

    NOTE: DO PART c) ONLY PLEASE INCLUDE THE R CODES ALONG WITH THE PLOTS 4. Let XI, . .. , Xn be a random sample from the inverse Gaussian distribution. IG(μ, λ), whose pdf is (a) Show that the MLE of μ and λ are μ-X and (b) It is known that nA/λ ~ χ2-1. Use this to derive a 100-(1-a)% CI for λ (c) (R) Consider the following dataset 10.6, 91.3, 51.7, 2.2, 3.8, 6.0, 17.8, 131.8, 31.0, 4.2,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT