let's say I want to pull out random values from a linear distribution function, I'm not sure how I would do that.. say I have a function y = 3x then I want to be able to pull out a random value from that line. this is what I've tried:
x,y = [],[]
for i in range(10):
a = random.uniform(0,3)
x.append(a)
b = 3*a
y.append(b)
This gives me y values that are taken from this linear function (distribution per say). Now if this is correct, how would I do the same for a distribution that looks like a horizontal line?
that is what if I had a horizontal line function y = 3, how can I get random values pulled out from there?
[0, 1].y = 3xdoesn't fit that criterion.