Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 Re: Help Me ! » one unknown and three equations » 2011-08-05 00:29:15

bob bundy wrote:

Firstly, the problem is definitely a linear programming problem, so the optimum point will always be a vertex of the triangle.

[...]

Will that suffice?

Yes - thank you.
That's what I implemented.

bob bundy wrote:

Incidently I also 'discovered' that for all three intersecting at a point
K1 + V1 = V2 + K2.

That's by design (due to a rule I set when forming the equations).

#3 Help Me ! » 1st derivative of this function? » 2011-08-04 11:06:55

Fibonacci
Replies: 1

Sorry - I'm stuck with this one. How do I work out the 1st derivative?

#4 Re: Help Me ! » one unknown and three equations » 2011-08-03 08:17:24

bob bundy wrote:

[...]
then q1 is negative too.
eg V1 = 0.01;   K2 = K3 = 0.2;     [...]
Have I misunderstood something here?

Yes:

bob bundy wrote:

Let's see how to get a single point of intersection.

The easiest starting point to work the intersection out are the three equations for x in post #1:


The above is true regardless which of the three equations you pair up.

However, finding the intersection is not the objective although it helps me in my real-life scenario to know where it is. Lets put it that way: I have a choice of lines and I choose those three that give me the best possible triangle. And that is one that gives me bottommost yellow dot (as per post #4) with a high y-coordinate.

bob bundy wrote:

In


I'd assumed I could cancel the fs

Indeed, the fs are identical.


The question is:
We have three lines that form a triangle where the lines intersect. The y-coordinates of the three intersactions are all different. I want to draw a vertical line that intersects with these three lines.

I want to find a vertical line where the lowest of the three intersects is the highest (as per post # attachment).

Can this be done mathematically? I can do this programmatically by calculating the three triangle points, "drawing" a vertical line through each point, then comparing the y-coordinates of the each vertical line's intersections  with the lines forming the triangle.

#5 Re: Help Me ! » one unknown and three equations » 2011-08-03 04:13:46

bob bundy, I feel terribly rude for not having replied earlier! But you must have edited your last post rather then creating a new one, which means no email notification is sent to subscribers.

I shall look at your detailed response later when I have some more time.

#6 Re: Help Me ! » one unknown and three equations » 2011-07-19 05:03:49

bob bundy wrote:

Now you've posted that diagram, I'm beginning to understand what you are after.

Thank you so much for introducing me to GeoGebra! Fantastic for developing and documenting ideas!

bob bundy wrote:

assuming the lines are all distinct, you'll always get your ideal 'x' at an intersection

I know it's obvious when looking at the chart. wink But why?

bob bundy wrote:

Your algorithm for moving the yellow dot and getting its maximum position will always end up at point R01.

Or R02, see new screenshot.

bob bundy wrote:

I could generate an expression using these that will give the single 'x' where all three lines cross in a single point.

All three lines cross for

.

bob bundy wrote:

So what freedom do you have to vary the parameters for the lines?

Within given constraints, I choose the parameters with the objective of a high minimum

. So far I have been doing this from experience.

We know quite a few things about the lines' coefficients:

are positive (and therefore all lines' y-intersects >0)
is negative. I am pretty certain that, through choice, q1 and q2 are always positive because negative slopes give me low r.

Let's zoom in on the q's:



We know:


I choose a scenario where :

#7 Re: Help Me ! » one unknown and three equations » 2011-07-18 11:27:59

The three purple lines represent

.

They'll always intersect in 3 points forming a triangle. The dotted yellow line is some arbitrarily chosen

. I have marked its intersections with the three
using yellow dots.

On the screenshot, the lowest of the yellow dots has a y-value of 34. If I push the yellow line further right, this yellow dot will eventually coincide with

.

That is as high as the bottommost yellow dot can get for these 3 lines. That's the one I am looking for.

I think, most of the time this will coincide with an 

intersection.

I think what I need is a function that describes the lowest yellow dot and then determine its maximum.

I suspect we're in different timezones. But for me it's goodnight now!

#8 Re: Help Me ! » one unknown and three equations » 2011-07-18 11:18:29

Sorry. I got so used to my naming conventions I forgot to clarify.

are functions.
is the only variable, all others are constants.
is a constant replacing a more complex expression of
.

I have already solved

. However, there are 3 different possible values depending on which two equations I try to equalize. (That is in the nature of the problem and quite correct.)

Lets call the 3 possible values

. In an ideal world all three lines 
would intersect in one point thus giving me just one
.

In the real world the don't, which is why I have to choose a make-do value for

, which fulfils certain criteria.

Having thought about this a wee bit more, I need to rephrase what I am looking for: I want to find the

for which the lowest 
is the greatest.

I'll post a screenshot to illustrate what I am looking for in the next post.

#9 Help Me ! » one unknown and three equations » 2011-07-17 19:21:04

Fibonacci
Replies: 10

I have three linear equations



(At this point I am not expanding

to avoid needless complication.)

The objective is to find

for which
. For a particular
all lines intersect in one point. Otherwise, I have three intersections, which I can determine by pairing up
etc.:



As I can't equalize all results, I would like to find

for which
are as close as possible.

I'd be grateful for any inspiration how to tackle this problem.

#10 Re: Help Me ! » probabilities - which formula to apply? » 2011-07-15 04:26:01

bobbym wrote:

started with the Z80 -> 6809E -> MC68000 -> 80386

Started with IBM System/370 -> half a dozen other architectures I don't remember -> 8051

bobbym wrote:

I think you are starting to get into something called expectation. This is totally different from the probability of something occurring.

I am getting a bit out of my depth here. Expectation - is that the same as EV? My limited experience with this is just in relation to Roulette or BlackJack wager requirements. (You determine the EV from the house edge.)

Anyway, I am quite happy to retire this thread now. I have taken a few things from it apart from the hypergeometric distribution function: I even installed GeoGebra, and I am switching my wiki to LaTeX-based MathJAX.

Many thanks for the inspirations.


I shall be back with probability questions about my favourite dice game. No money involved but I'd like to get an edge. wink

#11 Re: Help Me ! » probabilities - which formula to apply? » 2011-07-14 09:02:28

By the way, I saw mentioned somewhere here that you were an Assembler programmer. The good old times ...

Back on topic: From a betting point of view, the bets in the WIN and PLACE markets are completely separate. The bookmaker will treat bets in the two markets independently.

I might bet horse A to WIN and additionally I might place another bet for it to PLACE.
If A comes first, both bets win. If A comes second, the WIN bet loses but the PLACE bet wins.

Continuing with the post #18 example, I placed three WIN bets on horses A, B, C. Additionally I placed PLACE bets on A and B.

Although the markets are independent, the results are not. We know that when A WINs it also PLACEs per definition. I detailed the only possible outcomes for one WIN bet wins  + 2 places in post #22.

#12 Re: Help Me ! » probabilities - which formula to apply? » 2011-07-13 23:41:51

Sorry, I' d been away for a while.

I am not quite sure I understand how you arrived at the formula in post #21.

You use the variable bets=3 in the formula, which is the number of bets in the WIN market. (Going back to my question and example in post #18, there are two sets of bets: 3 bets in the WIN market and 2 bets in the PLACE market.)

What I can't see is how we can possibly apply the same formula because it only takes into consideration the number of bets in one market.

#13 Re: Help Me ! » probabilities - which formula to apply? » 2011-06-29 08:13:15

It doesn't add up. Back to the drawing board.

#14 Re: Help Me ! » probabilities - which formula to apply? » 2011-06-23 04:41:22

I think you can only generalize the combined WIN and PLACE bet problem by putting the horses into different groups.

Variables
r # of runners
p # of places
h # of hits
bw # horses with a win bet and no place bet
bp # horses with a place bet and no win bet
bb # horses with both a place bet and a win bet

Idea
Treat 1st position  separately and combine with probabilities of the remaining positions. This should enable us to use the hypergeometric distribution function again:


Scenarios

WIN and 0 places

WIN and 1 place


no WIN and 0 places


no WIN and 1 place

#16 Re: Help Me ! » probabilities - which formula to apply? » 2011-06-20 08:46:59

Fibonacci wrote:

r = 10, p = 3

WIN : b = 3 (horses A or B or C to win)
PLACE : b = 2 (horses A or B to place)

a WIN bet wins  + 2 places

Looking at the first 3 positions, valid outcomes (where x is any horse but A,B, C):
ABx
AxB
BAx
BxA
CAB
CBA

Fibonacci wrote:

a WIN bet wins  + 1 place

CAx
CxA
CBx
CxB
Axx (where x can be C)
Bxx

Note: there is no place bet on C.
Note 2: if A or B win, this means a place in the place market, too.

#17 Re: Help Me ! » probabilities - which formula to apply? » 2011-06-19 06:49:57

bob bundy wrote:

you might like geogebra which is similar and available as a free download

Interesting. It's part of my Linux Debian distro.

#18 Re: Help Me ! » probabilities - which formula to apply? » 2011-06-19 06:46:19

Combination of WIN and PLACE bets on the same race

r = 10, p = 3

WIN : b = 3 (horses A or B or C to win)
PLACE : b = 2 (horses A or B to place)


possible outcomes:

a WIN bet wins  + 2 places (= C wins and A+B place)
a WIN bet wins  + 1 places
a WIN bet wins  + 0 places
no WIN bet wins  + 2 places
no WIN bet wins  + 1 places
no WIN bet wins  + 0 places





Many thanks. I am enjoying the discussion.

#19 Re: Help Me ! » probabilities - which formula to apply? » 2011-06-19 04:09:26

Hello bobbym,
Have I got hallucinations? I thought a couple of hours ago I had seen you write that I had reworked your formula incorrectly?

My version:

Your version:

I hadn't noticed but our formulae are actually equivalent.

I concur with your examples. I get the same results.



Last week I was trying to work out something more complicated: the probabilities of a combination of win bets and place bets (on the same race). It can be fairly easily done with a tree diagram but we probably won't find a neat formula for it!

#20 Re: Help Me ! » probabilities - which formula to apply? » 2011-06-19 01:23:49

bobbym wrote:

[...] how do I work out the exact number of hits for r = 16, p = 5 and b = 4 ? (i.e. 0, 1, 2, 3, or 4 horses placing)

You will have to use the hypergeometric distribution.

Ingenious!

So, going back to my variables
r # of runners, p # of places, b # of bets, h # of hits (winning bets)

Curiously, before I saw your post, I had tinkered around with an example and came to the conclusion that the formula should be:


It took me a while to convince myself that hypergeometric distribution is the right formula because the example on Wikepedia is about black and white marbles picked from an urn. And I thought this was different because I had to take into consideration the different possbile position of horses in the race outcome.


I realize now that my attempt is actually equivalent to the hypergeometric distribution, just needlessly complicated!


Many thanks!

#21 Re: Help Me ! » probabilities - which formula to apply? » 2011-06-18 23:55:12

bob bundy wrote:

The tree diagram is quite usefol for visualizingthe different senarios. How did you generate it?

(i) I start by analysing how many (probability) events there are.  [...]

Thank you, Bob. I meant, "How did you create the graphic?"

#22 Re: Help Me ! » probabilities - which formula to apply? » 2011-06-18 06:04:14

bobbym wrote:

What do you mean by bets? And what do you want to do with them?

Going back to the example in my original post, I am looking at 2 specific horses (because I put a place bet on them).

bobbym wrote:

Why do want to complicate your life by throwing in the binomials? Why not just do it with fractions?

Because I am looking at generalizing the problem with a formula that I can enter in a spreadsheet. Unless I am missing something I can only do this by using the factorial function.



We have done case 2 (exact number of places) by subtraction. That's all fine well for small p and b, but how do I work out the exact number of hits for r = 16, p = 5 and b = 4 ? (i.e. 0, 1, 2, 3, or 4 horses placing)

#23 Re: Help Me ! » probabilities - which formula to apply? » 2011-06-18 05:25:35

Thank you for your replies.

The tree diagram is quite usefol for visualizingthe different senarios. How did you generate it?

I need to program this, so need the formula.

Attempt at Formulae

r = 10, p = 3, b = 2 (# of runners, places, bets)

case 1 (both place):

I still can't quite get my head round it but that's the number of combinations in the frame divided by the number of combinations in the field.*


case 2 (exactly one places)

no horse places:




*Terminology
frame = placed horses; field = all runners

#24 Help Me ! » probabilities - which formula to apply? » 2011-06-18 00:47:36

Fibonacci
Replies: 34

Tell us what level you are at.

I took a programming/maths degree 25 years ago.
However, I have always struggled with probabilities. My main problem is that I often don't know which formula to apply.

Terminology

In horse racing, there are two types of bets: WIN and PLACE
A WIN bet wins if the horse comes 1st. The horse wins.
A PLACE bet wins if the horse comes either 1st, 2nd or 3rd (which of the three positions makes no difference). The horse places.

Example

10-runner race; 2 place bets on horses A and B


Question

1) What are the chances of both place bets winning?
2) What are the chances of exactly one horse placing?

Attempt (at question 1)


Most importantly, what's the formula for this problem?

Board footer

Powered by FluxBB