can anybody explain difference between below two codes pdf() and cdf(). i am not able to understastand it. it is from systematic option trading quantra course. i will be thankful to those who explain with example, Thank you,
from scipy.stats import lognorm
lognorm.pdf(x=x, scale=mean, s=sigma)
and
lognorm.cdf(x=payoff.index, scale=mean, s=sigma)
Hi Vivek,
The pdf() and cdf() functions from scipy.stats for the lognormal distribution serve different purposes.
PDF represents the probability density function. It provides the density of the probability at each specific point "x". It does not give the probability directly but indicates how dense the probability is around x.
CDF on the other hand represents the cumulative distribution function. It provides the cumulative probability up to a point x. Unlike pdf, cdf gives a cumulative view of probabilities linked to a random variable.
For a more detailed understanding you can also refer to this post.
Hope this helps!
Thanks
Rushda
Thank you for reply .