I have a 2d pdf function, it's a bivariate normal distribution,
I plot it angle-wisely
, to compare with the original data that I get. That is, I turn (x,y)
into (r, theta)
, and then do some integration. This could be done very easily with Scipy.integrate
# Let f be the pdf
x_vals = np.arange(0, max_speed, 0.5)
y_vals_ =[integrate.nquad(f,
[[x_val-0.5, x_val+0.5],[angle_radian-incre_radian/2, angle_radian+incre_radian/2]])
for x_val in x_vals]
And I can compare pdf
with original dataset
The problem, is that density plot
is not enough, I also want to make a q-q plot
. But, since the pdf is a result of integration, is it possible to do it with Scipy?
I have no idea about it. Maybe a possible solution is resort to Sympy
. Since the parameters of bivariate pdf
is all known, we can generate the correspoding angle-wise pdf.