I'm trying to plot the CDF of a simple "nCr" experiment:
A box contains 4 screws and 6 nails. Two items are drawn at random without replacement. Let X be the number of nails drawn.
I built a piecewise function:
`F[x_] := \[Piecewise] {
{12/90, 0 <= x <= 1},
{60/90, 1 <= x <= 2},
{1, x >= 2},
{0, True}
}`
which outputs an unexpected "shift":
which I can 'band-aid fix' by plotting F(x+1) in the 'DiscretePlot' function.
Am I thinking about the CDF function incorrectly? Is there another way to build and plot F?
Plot[F[x], {x, 0, 3}]
and do not use capital variable names, they are reserved for built in functions. $\endgroup$EmpiricalDistribution[]
? $\endgroup$