How to find the smallest n s.t:
$$\binom{2500-n}{50}/\binom{2500}{50} < 0.5$$
How to find the smallest n s.t:
$$\binom{2500-n}{50}/\binom{2500}{50} < 0.5$$
Clear["Global`*"]
NArgMin[{n, Binomial[2500 - n, 50]/Binomial[2500, 50] < 0.5}, n] //
Ceiling // Quiet
(* 35 *)
EDIT: Or
ArgMin[{n, Binomial[2500 - n, 50]/Binomial[2500, 50] < 1/2, n > 0},
n, Integers] // Quiet
(* 35 *)
Check,
Binomial[2500 - #, 50]/Binomial[2500, 50] & /@ {34, 35, 36} // N
(* {0.500818, 0.490663, 0.480711} *)
Gamma or Factorial or Binomial are defined for real or complex arguments. Evaluate Binomial[5.3, 3.6]
– Bob Hanlon
Sep 05 '22 at 16:32
Binomial[m, n] // FunctionExpand evaluates to Gamma[1 + m]/(Gamma[1 + m - n] Gamma[1 + n])
– Bob Hanlon
Sep 05 '22 at 17:00
ArgMin not documented on https://reference.wolfram.com/language/ref/ArgMin.html?q=ArgMin?
– omg
Sep 05 '22 at 17:09
An alternative approach:
expression = Binomial[2500 - n, 50]/Binomial[2500, 50];
Min@ SolveValues[FunctionExpand[expression] < 1/2, n, Integers]
(* Out: 35 *)
Min@(why @) and FunctionExpand(why is it needed) and the difference between SolveValues and Solve?
– omg
Sep 06 '22 at 02:18
@ is a prefix notation for function application. In other words, f[x] can also be written as f@x. See the "Short Forms" section here. FunctionExpand is needed because it didn't work without it :-) I assume because Solve doesn't know how to transform the binomials on its own. SolveValues is equivalent to Solve, but it returns the values of the solutions rather than replacement rules. Compare Solve[x - 2 == 0, x] and SolveValues[x - 2 == 0, x].
– MarcoB
Sep 06 '22 at 03:44
Binomial[2500 - n, 50]/Binomial[2500, 50] for integer domain?
– omg
Sep 06 '22 at 11:39
DiscretePlot[Binomial[2500 - n, 50]/Binomial[2500, 50], {n, 1, 150}]
– MarcoB
Sep 06 '22 at 12:23
Working in $\mathbb{R}$ instead of $\mathbb{N}$, we can ask
Reduce[Binomial[2500 - n, 50]/Binomial[2500, 50] < 1/2, n, Reals] // RootReduce
(* 34.0798 < n < 4916.92 *)
The results are given as Root objects (zeros of degree-50 polynomials) that can be converted to real numbers with N.
Catch[For[i = 0, i <= 2500, If[Binomial[2500 - i, 50] < 1/2 Binomial[2500, 50], Throw[i]]; ++i]]– Matsmath Sep 06 '22 at 04:21