Algebra

This is waaaay off the topic of larp, although it is something game-related I’m working on.

Can anyone help me solve this bit of algebra for x?

x = y + yx

Back in school I aced maths (long ago, galaxy far away, etc), and I’ve untwisted this from a more complex formula, but now my brain seems to have turned off. I know there are numbers that fit, for example x=4 and y=0.8, but I don’t remember how to disentangle y from x in a case like this - assuming it’s possible and that I ever knew, that is.

I don’t think it is solvable. But, like you, It’s been a long time since i was doing calc.

I can flick a message to a 7th form math teacher though, I’ll get back to you. :smiley:

Wolfram Alpha is a great site

wolframalpha.com/input/?i=x+%3D+y+%2B+yx

Thanks.

If it’s any help it started out as this: y = x/(x+1)

I don’t know which form is closer to a solution, if there is one. If it turns out to be calculus then that would explain my brain-freeze: I spent calculus doing everything except listening, and little of it stuck.

What I’m actually trying to do is convert a fractional probability (e.g. 0.8 or 80% chance) to the first part of an “odds” figure that’s compared to 1 (e.g. 0.8 chance is equivalent to 4:1 odds).

That start makes it a bit easier, having X on both sides confuses me… :stuck_out_tongue:

[quote=“Ryan Paddy”]Thanks.

If it’s any help it started out as this: y = x/(x+1)

I don’t know which form is closer to a solution, if there is one. If it turns out to be calculus then that would explain my brain-freeze: I spent calculus doing everything except listening, and little of it stuck.

What I’m actually trying to do is convert a fractional probability (e.g. 0.8 or 80% chance) to the first part of an “odds” figure that’s compared to 1 (e.g. 0.8 chance is equivalent to 4:1 odds).[/quote]

its calculus.

to convert its relatively easily. is there a trick to what you are calculating?

Thanks, that WolframAlpha thing is cool. I didn’t see your post until after I posted my second one, so I was responding to TazzyD.

I’m not sure how the solution for x it gives will allow me to calculate it from y, as it doesn’t mention y.

The part of the double-hyperbola plot I’m interested in is the area where both x and y are positive. That part looks like a simple curve, so I’m guessing there’s a simple formula for x for it?

Not sure what you mean by a trick, unless it’s something like what I’ve said about x and y both being positive.

My overall goal is to try to figure out the probability of victory over an opponent you haven’t faced, when you have faced opponents in common.

Let’s say A has an estimated 80% chance of beating B (based on their past encounters), and B has an estimated 80% chance of beating C. I’m looking for ways to estimate the chance of A beating C.

I’m considering putting both probabilities in the odds-versus-one form and multiplying, then converting back to a fractional probability. Seems to have an asymptote of 1, and 50% odds (i.e. equal opponents) are neutral in the multiplication (because they equate to 1:1 odds), which are the attributes I’m looking for.

With the A - B - C situation I outlined, the estimate of A beating B would be 0.888 (recurring). It may need to be adjusted or dampened, which I’d do once I have some real-world data to see how close the estimate is to real results.

[quote=“Ryan Paddy”]This is waaaay off the topic of larp, although it is something game-related I’m working on.

Can anyone help me solve this bit of algebra for x?

x = y + yx

Back in school I aced maths (long ago, galaxy far away, etc), and I’ve untwisted this from a more complex formula, but now my brain seems to have turned off. I know there are numbers that fit, for example x=4 and y=0.8, but I don’t remember how to disentangle y from x in a case like this - assuming it’s possible and that I ever knew, that is.[/quote]I’m not sure what you mean by ‘solve for x’ - you’ve got one equation with two variables; it’s defining a line of valid values in space. If you had another equation of y as a function of x (or one of x or y is a constant), then you could solve for the point or points where they’re both valid at the same time. For an extra little twiddle (because I can remember One Single Thing from 6th form maths, for the equation y = x/(x+1) which the one above can be rearranged to, it’s undefined for x = -1 because that would mean a divide by zero.)

What I want to know is: if I know the value of y, and I know both x and y are positive, how do I calculate the value of x?

Hang on, I think I misunderstood. You want to convert a function y(x) into a function x(y), so that you can solve for a set of arbitrary y values?

Maths major boyfriend said “It’s complicated” and went to Wolfram Alpha too:
x = y/(1-y) is the inverse - I checked the numbers for 0 <= x <=2 and it comes out right.

Steph

Edit: Removed redundant minus signs
You know the worst bit? I used to have to do this kind stuff for a living. Most of it’s clean evaporated out of my head. :frowning:

Awesome, that’s it! Thanks Steph and everyone who helped.

Sorry if I wasn’t very precise with my request, but it seems the power of the larperweb has prevailed over my vagueness and inaccurate terms. :wink:

And now that allows me to progress to the really tricky part - applying this as part of an algorithm to a “graph” of all players in a hypothetical game, somewhat like what PageRank does for web pages, but for players in a game network.

y=x/(x+1)
x=y(x+1)
x-yx=y
x(1-y)=y
x=y/(1-y)

I don’t see why so many people jump to WolframAlpha to solve something which is strictly linear :unamused: You’re all lazy :stuck_out_tongue:

This here is the leap I couldn’t quite make, but I see it now.

Your math will fail for paper-scissor-rock type variations. :wink:

Your math will fail for paper-scissor-rock type variations. :wink:[/quote]
I suspect my math will fail all over the place. Just want something to go forward with, can adjust or replace it later once I have data to compare it to. It’s intended for a contest that is mostly skill, but involves some luck, so there is almost always a chance of an upset.

If you mean that it will fail for a completely random game, I think that’s actually the one situation where this formula is close to foolproof. The average probability of victory in a random game will approach 0.5, and when you run the formula x=y/(1-y) over that you get 1, multiply that together with other 1s as much as you like and you still have 1, convert it back to a probability using the formula y=x/(x+1) and you still have 0.5. Meaning that however many opponents in the chain of opponents-in-common, the estimated probability of beating a never-played opponent will still approach 0.5, because the estimated chance of victory between all the pairs of opponents in the chain will approach 0.5. Of course, it should always be 0.5 not merely approach it but that’s just the nature of the beast, being an estimating formula.

I think this thread is over now but i just want to confirm that yes Steph’s BF at Krintar are right…

Making X the subject of y=x/(x+1) gives:

x=y/(1-y)

I think he was in fact referring to the Paper>Rock>Scissors>Paper nature of the game, i.e. situations where one type of competitor may be more effective against other types. The simplest other example I can think of is based on Pokémon:
Say you have some arbitrary Pokémon of the types Water, Ground, Fire, Rock and Poison. The fight you’re trying to predict the outcome of is Water vs Ground, and both of them have fought all the others.
Now, Water and Ground are both strong against Fire and Rock. However, Ground is strong against Poison but Water is not. Therefore we have

F R P W 1 1 0.5 G 1 1 1
in (loose) terms of probability of victory. Now, this would seem to suggest that Ground will beat Water - after all, it has a slightly stronger showing against the others. However, Water is strong against Ground, so the expectation is wrong.

It’s exactly what I wanted to say, but couldn’t :slight_smile: