I am trying to simulate some data where a response can either be right (1) or wrong (0). I am thus trying to find a distribution in which there are four conditions (in this case degrees of a circle).
Thus, the x axis is pi/2, pi, pi1.5, 2pi. I have normalised this from 0 to 1 to make this easier. On the y axis I would like the probability of answering correct so is 0-1 or 0-100 etc. I am trying to generate/plot a sigmoid function such that the probability is higher when the condition is closer to 1 and lower when the condition is closer to 0.
I cannot seem to be able to generate the sigmoid between 0 and 1, it just gives me a straight line unless i set x = np.linspace (-10,10,10). How can I do this? The code I currently have is below. Thank you!
I was originally going to use a beta distribution as this is better suited (as it is degrees around a circle) but cannot seem to get it into the shape I want. Any help would be greatly appreciated!
def sigmoid(x,x0=0,k=0.5):
return (1 / (1 + np.exp(-x)))
x = np.linspace(0,1,10)