0

Let x be a random variable with probability density function (pdf) x ~ Gamma(1, 1). How to plot the pdf of z where z=x^2/(1+sin(x))? This is what I have tried, I am not sure how to get z from x.

x = np.linspace (0, 100, 200) 
y1 = stats.gamma.pdf(x, a=1, loc=1) 
plt.plot(x, y1, "y-", label=(r'$\alpha=29, \beta=3$')) 
VXL963
  • 41
  • 5
  • What have you tried? Any guess on why it doesn't work? – ichramm Sep 27 '21 at 20:24
  • Does this answer your question? [How to plot gamma distribution with alpha and beta parameters in python](https://stackoverflow.com/questions/42150965/how-to-plot-gamma-distribution-with-alpha-and-beta-parameters-in-python) – Ashok Arora Sep 27 '21 at 20:25
  • @JuanR please see my updated post. Thanks – VXL963 Sep 27 '21 at 20:41

0 Answers0