Hi all, I have a problem with pdf estimate that needs your help. I am asked to verify that the probability of rv Z (number of trials) given that there are exactly 2 successes is a negative binomial distribution. I generate random numbers many times and record the number of trials required for 2 successes everytime. Then, I find the frequency at which each values of Z occur (Ex: repeating 1000 times the experiment, I find that only 60 times that the number of trials is 10 for exact 2 successes to occur, hence the frequency is 60/1000 = 0.06). After that, I try to estimate the pdf of Z using Kernel and compare with the plot by using nbinpdf available in MATLAB but the result is so terrible. I'm thinking of using kde function but do not know how to use. I really aprreciate your help, please.
Hi Steven. It is the integral of the pdf function should be 1. So if your x-interval is very small, then the y-value of the pdf function could be larger than 1. E.g. A uniform distribution on x=[0,0.01]. Then y need to be 100 to make the integral 1.
I am using Botev tools and do not understand why the density function has values greater than one. I am knew to KDE and don't understand this yet. I figue a density function is suppose to add up to 1 when you integrate it?