ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 07 Jul 2023 12:32:51 +0200Plotting a Probability distribution with varying parameterhttps://ask.sagemath.org/question/69787/plotting-a-probability-distribution-with-varying-parameter/Suppose I wish to plot the function
import numpy as np
var('a,y')
A=np.linspace(-1,1,10)
for a in A:
z=a+x-(e^(-y^2/2))/sqrt((2*pi))
plot3d(z,(x,-1,1),(y,-1,1))
That is, I wish to plot the function `z` over a range of `a`. Actually the original function was `z=a+x`. But, in order to introduce randomization, I changed the variable `x` to `x-y'`, where `y'` is the standard normal variable. I wish to obtain the plot of `z` as a kind of variable probability distribution over the grid of `x` and `y` with the variation of `a` (so kind of series of probability distributions overlapping each other). How do I do this? Any hints? Thanks beforehand.vidyarthiFri, 07 Jul 2023 12:32:51 +0200https://ask.sagemath.org/question/69787/