Message Boards Message Boards

2 Replies
1 Total Likes
View groups...
Share this post:

Using Solve function with summation

Posted 8 months ago

Hello, I have the following problem:

Tickets are being sold. There is a 1/8 probability that you get a special ticket, which is free. How many tickets would you have to buy to get at a probability of getting 1 ticket of at least 50%

This is how I solved it in Mathematica:

Solve[0.5 == Sum[Binomial[x, i]*(1/8)^i (7/8)^(x - i), {i, 1, x}], x]

It gives me an output of x -> 5.19089, which is correct, but GeoGebra was able to solve it Symbolically and got

Log[2]/(3 Log[2] - Log[7])

which is equal to 5.190.... My Question is how do I get mathematica to give me that symbolic result? When i solve it also gives me this warning: Solve::ifun: Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution information.
Any help is appreciated. :)

POSTED BY: Thomas Weichhart
2 Replies

Use exact rational numbers instaed of floating point:

Solve[1/2 == Sum[Binomial[x, i]*(1/8)^i (7/8)^(x - i), {i, 1, x}], x]
POSTED BY: Gianluca Gorni

Oh yeah, that works! thank you

POSTED BY: Thomas Weichhart
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract