4

How to find the smallest n s.t:

$$\binom{2500-n}{50}/\binom{2500}{50} < 0.5$$

omg
  • 163
  • 3
  • 1
    Just try all possible 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

3 Answers3

4
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} *)

Bob Hanlon
  • 157,611
  • 7
  • 77
  • 198
4

An alternative approach:

expression = Binomial[2500 - n, 50]/Binomial[2500, 50];
Min@ SolveValues[FunctionExpand[expression] < 1/2, n, Integers]

(* Out: 35 *)

MarcoB
  • 67,153
  • 18
  • 91
  • 189
  • Can you explain the usage of Min@(why @) and FunctionExpand(why is it needed) and the difference between SolveValues and Solve? – omg Sep 06 '22 at 02:18
  • @omg @ 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
  • Thanks for the detailed explanation! BTW, how to plot Binomial[2500 - n, 50]/Binomial[2500, 50] for integer domain? – omg Sep 06 '22 at 11:39
  • @omg DiscretePlot[Binomial[2500 - n, 50]/Binomial[2500, 50], {n, 1, 150}] – MarcoB Sep 06 '22 at 12:23
2

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.

Roman
  • 47,322
  • 2
  • 55
  • 121