Probability Density Function on histogram - base R.

Hey guys! So I'm quite new with RStudio and I am needing some urgent help with some coding for general activities that I am finding it difficult. For this particular one we're using a dataset with an annual total precipitation for California from 1895-2019.

Based on this data I need to:

  1. Plot a histogram of this data with a reasonable amount of bins - this is what I got (file attached)

  2. estimate the mean and standard deviation of the normal distribution (I found the mean to be approx. 22 and sd to be 5.85).

  3. superpose a normal probability density function (PDF) to the previous histogram (this is the part I don't know how to do)

  4. Finally, based on the histogram that was superposed with the PDF, would you say the Normal distribution is a good fit? Why is that, given the skewed distribution with a high frequency of no precipitation occurrence??

Thank you guys!

Hi, welcome!

Homework inspired questions are welcome here, but you have to tell us what have you tried so far? what is your specific problem? We are more inclined towards helping you with specific coding problems rather than doing your work for you.

For guidelines about how to properly ask homework related questions here, please read our homework policy.

Hey! well, my issue is that I don't know what code to use in order to superimpose the PDF, that's all

Hi, maybe you could read the article and provide a reproducible example. It will make it easier for people to help you with your issue.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.