rnorm vs dnorm in R In human language the rnorm(n=1000, m=24.2, sd=2.2) returns the random numbers which follows normal distribution. Another explanation could be that it returns random numbers from which the histogram can be created. If you draw normal (bell shaped) curve it will perfectly fits to this histogram. Can you please explain dnorm in such human language (or even with math and/or graphic but to be understandable by newbie)?
 A: It's difficult to describe dnorm in similar terms because that's a somewhat backwards way to think of rnorm.
The d in dnorm stands for probability density function, or PDF. The term "density" is chosen because a probability density function is analogous to the density of a substance in chemistry: the input is a location in the support of the probability distribution (analogous to a location in space inside the substance), and the output is a relative measure of how much "stuff" is near that position.


*

*If you step on some dirt, the part you stepped on will be denser than the surrounding material

*If a lake is partially frozen, the frozen part will be less dense than the liquid part

*For normal-distributed variables, the probability of observing a point in $[-0.5, 0.5]$ is greater than the probability of observing a point in $[-2, -1]$.


The funny thing about continuous probability distributions is that the notion of a "location" is difficult to quantify. In fact, when we talk about a "location" in math, we are usually talking about a "point." A "point" is a structure so small that it has zero spatial extent; a point is infinitely small. Therefore we can't look at a random variable $Y$ that follows the normal distribution and say "the probability that $Y = 1.2$ is such-and-such", because $1.2$ is a point with zero spatial extent. Once you work through the underlying mathematics you realize that the probability is actually zero of $Y$ being equal to any real number.[1]
This is the case for any continuous probability distribution, including the normal (the norm part of dnorm) distribution. Therefore the best way to understand dnorm without equations, in my opinion, is to say that

if dnorm(y1) is bigger than dnorm(y2), then points near $y_1$ generally have higher probability than points near $y_2$.

This is a deliberately non-technical and non-rigorous definition. There's no universally applicable criterion for defining what "near" means in any particular context. But if you keep the analogy to the density of a physical substance in mind, you won't be entirely wrong.
Recall that I said your description of rnorm was somewhat backwards. That's because dnorm is actually the function that describes what it means for a random variable to follow the normal distribution. A function is just a mapping between inputs and outputs: dnorm is a complete description of the mapping between possible values for $Y$ and the probability densities of those values. That defines the probability distribution of $Y$. rnorm is just what happens when you repeatedly sample numbers in such a way that respects their relative density: values in higher-density regions are more likely to appear than values in lower-density regions. Just don't think too hard about what exactly a "region" is, or where a particular region starts and ends.
By the way, R does have the ability to plot smooth functions:
plot(dnorm, from = -4, to = 4)

works a lot better than
plot(density(rnorm(50000), bw = "nrd"), xlim = c(-4, 4))

and emphasizes the "fundamental" nature of dnorm versus the "derived" nature of rnorm.
[1]: If that makes your brain itch, maybe think of it this way: if the probability that $Y = 1.2$ is $p$, then what's the probability of $Y = 1.21$? How about $Y = 1.201$? Or $Y = 1.20000000000001$? The only reasonable way to cram infinitely many points into a finite space is to make each point infinitely small.
A: You know the probability density function for a standard normal distribution is 
$\frac{1}{\sqrt{2\pi}}e^\frac{-x^2}{2} $. 
The dnorm() function is just used to calculate the value of this function.
You can test using the following R code
density_standard_norm <- function(x)
{
1/sqrt(2*pi)*exp(-0.5*x^2)
}

dnorm(1, mean = 0, sd = 1)
[1] 0.2419707
density_standard_norm(1)
[1] 0.2419707

dnorm(2, mean = 0, sd = 1)

[1] 0.05399097

density_standard_norm(2) 
[1] 0.05399097

They are equal. For non-standard normal it's same.
