Question
From the lectures you may recall the concepts of probability mass and density functions. Probability mass functions relate to the probability distributions discrete variables, while
From the lectures you may recall the concepts of probability mass and density functions. Probability mass functions relate to the probability distributions discrete variables, while probability density functions relate to probability distributions of continuous variables. Suppose we have the following probability density function:
outcome = 0 , 1, 2, 3, 4, 5
probability= 0.1, 0.2, 0.3, 0.2, 0.1, 0.1
- Check the documentation of the the dnorm function using help(dnorm)
- Now calculate the density of the data vector and store it in a vector called density
- Finally make a plot with as x variable the data vector and as y variable the density variable
# simulating data
# check for documentation of the dnorm function
# calculate the density of data and store it in the variable density
# make a plot with as x variable data and as y variable density
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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