# Solving equation gives multiple incorrect answers

I have been trying to solve the equation in the image below, using the code:

Solve[(Sum[(195 + 1)!/(n! (195 + 1 - n)!) (x^n) (1 - x)^(195 + 1 - n), {n, 0, 3}]) == 0.84]

but this returns multiple solutions, only 1 of which gives the correct answer when plugged back in the original equation (~0.010702509925484938).

I'm new to mathematica, so I'm not too sure what may be going wrong in my approach. Any help is appreciated!

You have a precision problem. Rationalize your constant and you will get an accurate answer:

sum = Sum[(195 + 1)!/(n! (195 + 1 - n)!) (x^n) (1 - x)^(195 + 1 - n), {n, 0, 3}]
sol=Solve[sum == 84/100, x];


This give you an answer in root objects (look it up in the help). You may get an numerical answer using "N". This answer will be correct up to n digits e.g. a 16 digit answer:

N[sum, 16]


To check if the result is correct (up to 16 digits):

N[sum /. sol, 16]

• This works, thank you so much :)
– xylo
Commented Dec 14, 2022 at 15:02
• @HibatuNoor - And if you only want real solutions use sol = Solve[Sum[(195 + 1)!/(n! (195 + 1 - n)!) (x^n) (1 - x)^(195 + 1 - n), {n, 0, 3}] == 84/100, x, Reals] Or, if desired, restrict the domain to NonNegativeReals or PositiveReals Commented Dec 14, 2022 at 15:12
• Can also use NSolve and get accurate results provided input is higher precision, e.g. as solbig = NSolve[sum == 0.84100, x];` Commented Dec 14, 2022 at 16:50