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

You are not logged in.

## #26 2012-11-05 02:44:25

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

### Re: Expectation

Hi;

That is not the shortest way to get the expected value of an absorbing chain. Anyway for your matrix the correct answer is 2.

There is a much simpler general way to get it from all absorbing chains.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #27 2012-11-05 03:11:45

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,037

### Re: Expectation

What is that way?

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #28 2012-11-05 03:23:48

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

### Re: Expectation

Without the labels:

This is in the correct form which will be explained as we do larger problems. Anyway, you now throw away all rows that have a 1 and any rows below that. Then you throw away any columns with a 1 and all columns to the right of that one. You get:

As problems get bigger this method will look better and better.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #29 2012-11-05 03:34:01

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,037

### Re: Expectation

Well, let's try it on another problem. Got any?

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #30 2012-11-05 03:39:56

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

### Re: Expectation

Hi;

Same type but just a bit more difficult:

How  can you compute the expectation of the number of throws for a fair coin until you get a certain pattern, say two heads in a row?

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #31 2012-11-05 03:45:09

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,037

### Re: Expectation

Tt     Th   Ht   Hh
Tt (1/2 , 1/2 ,  0  ,  0)
Th ( 0  ,   0   , 1/2,1/2)
Ht (1/2, 1/2 ,   0  ,  0)
Hh (0   ,   0  ,   0   ,  1)

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #32 2012-11-05 04:04:04

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

### Re: Expectation

Hi;

That looks about right, very good. Now you must solve.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #33 2012-11-05 04:22:12

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,037

### Re: Expectation

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #34 2012-11-05 04:24:16

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

### Re: Expectation

Hi;

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #35 2012-11-05 04:36:26

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,037

### Re: Expectation

Maybe 4?

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #36 2012-11-05 09:15:43

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

### Re: Expectation

Hi;

After the rows and columns are eliminated.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #37 2012-11-05 10:06:33

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,037

### Re: Expectation

I got all that but wasn't sure what to do with the resulting column vector...

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #38 2012-11-05 10:22:28

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

### Re: Expectation

Hmmm, I have trouble with reading the answer too. Know what helps?

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #39 2012-11-05 12:03:21

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,037

### Re: Expectation

What?

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #40 2012-11-05 12:06:28

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

### Re: Expectation

Crom is strong! If I die, I have to go before him, and he will ask me, 'What is the riddle of steel?' If I don't know it, he will cast me out of Valhalla and laugh at me." -Conan the Barbarian

Experimental math! Back engineering! I almost always have the answer first, or the bounds the answer lies in. That is the secret of the riddle of steel. You are trying to solve them forward to back.

There are numerous other ways to demonstrate the answer of 6 ( notice the use of the word demonstrate ).

I will be busy today and away from the forum. We will continue with more problems when I get back if you want.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #41 2012-11-06 03:45:50

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,037

### Re: Expectation

Hi bobbym

How'd you get that equation?

What have you been busy with? The elections?

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #42 2012-11-06 03:49:19

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

### Re: Expectation

Hi anonimnystefy;

In will explain fully how that can be done when I get back from the elections. See you a little later.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #43 2012-11-06 04:00:27

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,037

### Re: Expectation

You are actually gonna vote?

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #44 2012-11-06 04:22:21

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,037

### Re: Expectation

Btw, I found a better Markov chain for the problem:

(1/2 , 1/2 , 0)
(1/2 , 0 , 1/2)
( 0  ,  0  ,  1 )

With states: empty string, 'H' and 'HH'. These string keep record of what we had till now. If we didn't throw the coin or the last throw was a tail then we have the state string to be an empty string. If the last throw was a head and the state string before the throw was empty, then the new string is 'H'. And finally, if last state string is 'H' and we get another head, then the new state string is 'HH' and this is the absorbing state. When we apply the method you have there, we will get the column vector (6,4) which means that we can get to HH in 6 steps from an empty string and 4 steps from one H. So the answer is 6.

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #45 2012-11-06 09:17:17

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

### Re: Expectation

Hi;

Yes, I vote. Does that surprise you?

Sometimes you find a shorter chain. I know about that one but when someone is trying to learn I do not take any shortcuts. Also, I am not Paul Keres.

Where were we? You wanted to know the derivation of the formula?

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #46 2012-11-06 09:52:12

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,037

### Re: Expectation

No I didn't. Btw, the formula seems kinda intuitive when compared to 1/(1-x) for summing the geometric series...

A new problem would be nice...

Yes, I'm surprised that you vote. Do you just cancel the ballot?

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #47 2012-11-06 10:01:53

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

### Re: Expectation

I am talking about the formula in post #40.

No, I vote for a candidate. Why are you surprised?

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #48 2012-11-06 10:08:44

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,037

### Re: Expectation

Oh, that one! Yes, I am curious as to how you got it.

I am surprised because I have no idea who you would vote for...

Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.

Offline

## #49 2012-11-06 10:12:35

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

### Re: Expectation

Hmmm, most of the time we for against something, not for something. Of course it does not matter but, have you read "The Sea Wolf," by Jack London?

This is what I have in my notes:

Let E denote the expected number of tosses before you get two heads in a row.  If your first toss is a tails, then the expected number of total tosses before two heads is E + 1.  If your first toss is a head and your second toss is a tail, then the expected number is E + 2.  If you toss two heads, then the number of tosses is 2.  These events occur with probability 1/2, 1/4, and 1/4, respectively.

In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

## #50 2012-11-06 10:16:19

anonimnystefy
Real Member
From: Harlan's World
Registered: 2011-05-23
Posts: 16,037

### Re: Expectation

Ahhhh... I get it. Thank you for the formula.