Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: Reach a Target Percentage
Posted:
Aug 14, 2013 5:00 PM


On Wed, 14 Aug 2013 20:17:54 +0000, Tom wrote: > I wrote a companion program for Microsoft's Spider Solitaire on my Casio > calculator. The program determines the "Win Rate" percentage based on how > many current "Wins" and "Losses" in the game: ... > For example, if there are currently 5260 wins and 145 losses, the "Win > rate" is 97.3172988 percent. That seems to work fine. > > I've been using this program to determine how many total wins are > necessary to reach a target percentage. To do this I have to rerun the > program and incrementally enter "wins" until the target is calculated. > > What I would like to do is write a new program that would calculate, > based on the current stats, how many more wins are necessary to reach a > target percentage. For example, if I know the target is 98 percent and my > wins are 5260 and losses are 145, how many total wins do I need to reach > 98 percent? ...
Let t = target, eg t = 0.98 for 98%. Let w and l be the current number of wins and losses, and d = number of additional wins needed to reach the target percent. You want t = (w+d)/(w+l+d), or t*(w+l+d) = w+d, or t*w + t*l  w = d  t*d, giving (t*(w+l)  w) / (1t) = d.
 jiw



