« first day (2947 days earlier)      last day (1527 days later) » 

6:11 AM
I am looking for a student that is interested in doing an internship spring/summer on modeling with partial differential equations using NDSolve. This internship can be remote despite what the full announcement says. If anyone here is interested please let me know or if you could forward this to potentially interested people I'd appreciate that. Thanks.
5
 
 
7 hours later…
1:26 PM
I have a stochastic function f which returns True or False and I construct a Table in a way similar to Table[f[x], {x, 0, 1, 0.01}]. The probability that f returns True goes up as x exceeds 0.5.
Is there a quick and simple way to plot a curve which would illustrate how this probability increases?
The focus here is on "quick and easy", as this is meant to be a documentation example.
Example: f[x_] := RandomReal[] > 1/(1 + Exp[15 (x - 1/2)])
This is the simplest way I have, but it tends to be slow due to the nested Table:
Table[Total@Boole@Table[f[x], {100}], {x, 0, 1, 0.01}] // ListPlot
 
 
3 hours later…
4:28 PM
@Szabolcs do you have a more complex example in mind?
for this one, you could always Plot[1 - 1/(1 + Exp[15 (x - 1/2)]), {x, 0, 1}]
or, maybe prob[x_] = Probability[v > 1/(1 + Exp[15 (x - 1/2)]), v \[Distributed] UniformDistribution[]], then Plot[prob[x], {x, 0, 1}]
even your "slow" approach only takes 0.07 seconds for this example!
 
 
1 hour later…
5:54 PM
@anhnha @anhnha Instead of defining Vin Vout inside a Module inside the Manipulate, try defining them as Manipulate variable with ControlType->None
 
 
1 hour later…

« first day (2947 days earlier)      last day (1527 days later) »