as the title mentions it I'm having some trouble understanding the following.
Assume we have $X_1 \dots X_n$ i.i.d. random variables with a known distribution and plotted histogram. For Example, use the R-Code: hist(rnorm(n)). Using this code and given a "big" sample size n, it seems like we get the p.d.f. for the Normaldistribution. My problem understanding this is the following: the p.d.f. is used to express the c.d.f. using $\mathbb{P}\left(X_i \leq t \right)= \int_{-\infty}^{t} f(x) \, \mathrm{d}x$. So it is (for me at last) not quite intuitive that a histogram of random generated variables looks like the given p.d.f. because the p.d.f. itself is not a "description" of the variables's values. The only thing that I assume is that you can argue this way - using the inversion method for understanding: we simulate $U$ with a uniform distribution on $\left[0,1\right]$ and use the errorfunction to get a value for our simulated normal R.V. at this point we use the c.d.f. which means we integrate up to $t$ satisfying the upper bound. And at this poin, simulation depends on the p.d.f. and we get simulated values that seem to look like the p.d.f. plotted in an histogram.
So, can anyone explain why plotting a histogram of simulated R.V. leads to the p.d.f. of the given distribution that is used to generate the R.V.?
There seems to be no 'nonparametric-estimation' tag?!
The sum of the bar heights in a histogram equals the sample size of the sample. The sample size is representative of 100% of the sample. The bars of a histogram are akin to taking a Riemann sum.
Dividing your histogram height by the sample size will give you an approximation to the PDF.
In other words, let each histogram bar's height be denoted $h_i$, and its width $w_i$, then $\sum_i h_i w_i \approx N \int_\mathbb{S} f(s)\, ds$, where $\mathbb{S}$ denotes your support.