Dominion Strategy Forum

Please login or register.

Login with username, password and session length
Pages: 1 ... 149 150 [151] 152 153 ... 201  All

Author Topic: Random Stuff  (Read 1171077 times)

0 Members and 3 Guests are viewing this topic.

Tables

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2817
  • Build more Bridges in the King's Court!
  • Respect: +3350
    • View Profile
Re: Random Stuff
« Reply #3750 on: June 16, 2014, 04:12:32 am »
0

Here's a question for everyone: Let's suppose you roll 1dX, where X is some positive integer. If you roll a 1, you stop. Otherwise, you repeat, but replace X with whatever number you roll.

What's the expected number of dice rolls before you roll a 1?

My mathematician intuition says the way to construct the answer is by induction in some way, but I dunno. Haven't really thought about it yet.

My stats is a bit rusty, but this sounds like a stochastic process? Would a Markov chain be appropriate?

Yeah, it's definitely a Markov Chain. If only I paid attention in those lectures... hmm...
Logged
...spin-offs are still better for all of the previously cited reasons.
But not strictly better, because the spinoff can have a different cost than the expansion.

qmech

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1918
  • Shuffle iT Username: qmech
  • What year is it?
  • Respect: +2320
    • View Profile
Re: Random Stuff
« Reply #3751 on: June 16, 2014, 04:15:13 am »
0

In expectation X halves at each stage, so my guess is that the expectation is logarithmic in X.  That makes me slightly more pessimistic for a nice exact formula, as there's no way to get logs out the recurrence. 

My stats is a bit rusty, but this sounds like a stochastic process? Would a Markov chain be appropriate?

This is a very boring Markov chain because it can't go backwards, and will eventually get stuck after a finite time.  Markov chains tend to be most interesting (and the tools we have for studying them are most useful) when it's possible to get to any state from any other state.
Logged

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Random Stuff
« Reply #3752 on: June 16, 2014, 04:29:33 am »
0

The answer is X, unintuitively that exactly what the intuition says.  Proof tba.

e: The number of trials needed until independent Bernoulli experiments with success rate p to succeed is geometrically distributed with parameter p.  Expectation of Geo(p) is 1/p.
e2: That it's geometric is obvious, success exactly at i-th time is p(1-p)^(i-1).  Proof for expecatiation of the geometric distribution can be found on wikipedia.


e3: Forget everything I said, I should not stop reading the post after the first 2 lines, but understand the problem first.
« Last Edit: June 16, 2014, 05:03:26 am by DStu »
Logged

Titandrake

  • Mountebank
  • *****
  • Offline Offline
  • Posts: 2210
  • Respect: +2856
    • View Profile
Re: Random Stuff
« Reply #3753 on: June 16, 2014, 05:01:58 am »
+3

I think the answer is partial sums of the harmonic series, where for 1dX it's

1 + (1 + 1/2 + 1/3 + ... + 1/(x-1))

It works up to 1d5 if my math is right. There's probably an induction you can do from the recurrence but I really do need to sleep.
Logged
I have a blog! It's called Sorta Insightful. Check it out?

DStu

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2627
  • Respect: +1490
    • View Profile
Re: Random Stuff
« Reply #3754 on: June 16, 2014, 05:03:35 am »
0

e4: Ok, listen again:
We have (as already noted)
p(n) = 1/n(1 + sum(1 + p(i), i=2..n-1)
therefore
p(n-1) = 1/(n-1)(1 + sum(1 + p(i), i=2..n-2)

Substitution in the first one yields:
p(n) = (n-1)/n*p(n-1) + 1/n(1+p(n-1))
  = p(n-1) + 1/n
  = what Titandrake says.

so p(n) ~log(n).

Might be some small mistake in the setup, but that's how it should go, take formula for p(n), substitute everything on the rhs by p(n-1) and solve this one step recursion formula...

:e2 titandrake is right, it's 1/n not (n-1)/n

:e3 log(n) is also the expected scaling, you expect to about half the number of your dice each roll, so you should need logarithmic time to go down to o(1)
:e4 forgot to post half of the terms from my sheet....
« Last Edit: June 16, 2014, 05:08:58 am by DStu »
Logged

Nevermind

  • Bishop
  • ****
  • Offline Offline
  • Posts: 121
  • Respect: +77
    • View Profile
Re: Random Stuff
« Reply #3755 on: June 16, 2014, 08:46:06 am »
+2

Stop the math questions! Come back to reality! To spare you guys from the boredom of math, let me post this video to get your mind off math.

http://m.

Apologies for any hurt ribs from laughing to hard or if it's been posted on here already.
Logged

Kirian

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 7096
  • Shuffle iT Username: Kirian
  • An Unbalanced Equation
  • Respect: +9415
    • View Profile
Re: Random Stuff
« Reply #3756 on: June 16, 2014, 08:59:31 am »
0

OK, so, empirically, the answer for 1d2 is 2.  Imagine an infinite number of monkeys (or undergrads) tossing coins and writing down the sequence until they get a tail.  Obviously, 1/2 will get a tail on toss 1 and be spared being part of this example any longer.  Half the rest (1/4) will hit a tail on toss 2, and half the rest (1/8) on toss 3, giving us:

R = sum(i = 1....inf) i/(2^i) = 2

The proof that this converges to 2 is left as an exercise for the reader (read: I used Excel, hence empirical "proof").

1d3 and up are, of course, harder.  I'll... think about that one.  But for now we have definite answers for 1d1 (R = 1) and 1d2 (R = 2).
Logged
Kirian's Law of f.DS jokes:  Any sufficiently unexplained joke is indistinguishable from serious conversation.

Kirian

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 7096
  • Shuffle iT Username: Kirian
  • An Unbalanced Equation
  • Respect: +9415
    • View Profile
Re: Random Stuff
« Reply #3757 on: June 16, 2014, 09:40:54 am »
0

Okay, after some more scratching, I realize that Titandrake's first answer (1, 2, 5/2, 17/6,...) is correct.

Edit:  And after searching some in OEIS, Titandrake's second answer is also correct, or more clearly is the compactified version of the original answer.  So, the harmonic numbers + 1.
« Last Edit: June 16, 2014, 10:23:46 am by Kirian »
Logged
Kirian's Law of f.DS jokes:  Any sufficiently unexplained joke is indistinguishable from serious conversation.

AndrewisFTTW

  • Saboteur
  • *****
  • Offline Offline
  • Posts: 1129
  • Respect: +1084
    • View Profile
Re: Random Stuff
« Reply #3758 on: June 16, 2014, 12:11:58 pm »
0

Stop the math questions! Come back to reality! To spare you guys from the boredom of math, let me post this video to get your mind off math.

http://m.

Apologies for any hurt ribs from laughing to hard or if it's been posted on here already.

"If that's funny then... what is funny?"

A question for the ages indeed.
Logged
Wins: M39, M41, M48, M96, M97, M102, M105
Losses: M40, M43, M45, BM17 (?), RMM13, RMM17, RMM20, NM7, ZM18, M100, M109
MVPs: M97
Mod/Co-Mod: M46, M49, M52, NM10

sudgy

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3431
  • Shuffle iT Username: sudgy
  • It's pronounced "SOO-jee"
  • Respect: +2708
    • View Profile
Re: Random Stuff
« Reply #3759 on: June 16, 2014, 12:49:15 pm »
0

Stop the math questions! Come back to reality! To spare you guys from the boredom of math, let me post this video to get your mind off math.

We do have a thread for just math, and I just posted in it.
Logged
If you're wondering what my avatar is, watch this.

Check out my logic puzzle blog!

   Quote from: sudgy on June 31, 2011, 11:47:46 pm

pingpongsam

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1760
  • Shuffle iT Username: pingpongsam
  • Respect: +777
    • View Profile
Re: Random Stuff
« Reply #3760 on: June 16, 2014, 01:27:39 pm »
+1

Why not both? I use tasker to apply the preferred keyboard for the respective app. I have 3 different keyboards but I only use them for specific apps.

Missed this from earlier.  I can't think of any specific app where I would prefer one keyboard over the other.  As I said, I now prefer the aesthetics of Swiftkey, and I can only find one function that Kii has over SwiftKey.  That function isn't something I use that often anyway, but it's also something that could potentially be used in any app.  If I ever really want to switch keyboards, I can do that from the notification area.

I'm curious which keyboard apps you have installed and what you use each of them for.

Swiftkey, Hacker's Keyboard and Terminal IDE.

I use a lot of ssh, VPN, bash and remote command line utilities and thus swiftkey proves quite terrible and even incapable. I need to be able to send control keys, tab, escape, etc. I pretty much only use switfkey for email and messaging where it is about as awesome as anything.
Logged
You are the brashest scum player on f.ds.

Archetype

  • Jester
  • *****
  • Offline Offline
  • Posts: 992
  • Suffers from Fancy Play Syndrom
  • Respect: +690
    • View Profile
Re: Random Stuff
« Reply #3761 on: June 16, 2014, 01:41:37 pm »
0

Is it ok to eat oatmeal as a snack?

It's pretty dull...
I tend to put cinnamon/brown sugar in there to sweeten it up. I'm wondering if other people use oatmeal than more than just a breakfast food. Maybe we could even swap recipes.
you could just toast the oats, and put them over yogurt.  Or you could make a full-on snack-bar thing.  We have a recipe for one with oats, flax, quinoa, pistachios, cranberries...and...other stuff?  chocolate and honey are up in that mix.  But you've gotta prep it before hand, it's not just a throw together and munch sorta thing.
Interesting! I'm not a big fan of yogurt, but I don't think I've ever had toasted oatmeal. I'll have to try that - thanks!
Logged

Lekkit

  • 2011 Swedish Champion
  • *
  • Offline Offline
  • Posts: 1253
  • Shuffle iT Username: Lekkit
  • Respect: +674
    • View Profile
Re: Random Stuff
« Reply #3762 on: June 16, 2014, 02:07:56 pm »
0

Oatmeal Wafers. It's seriously the best. I can eat those all day long!



Not sure if that's the best recipe out there, but it should do. ;)
Logged

blueblimp

  • Margrave
  • *****
  • Offline Offline
  • Posts: 2849
  • Respect: +1559
    • View Profile
Re: Random Stuff
« Reply #3763 on: June 16, 2014, 02:22:50 pm »
+1

Here's a question for everyone: Let's suppose you roll 1dX, where X is some positive integer. If you roll a 1, you stop. Otherwise, you repeat, but replace X with whatever number you roll.

What's the expected number of dice rolls before you roll a 1?

My mathematician intuition says the way to construct the answer is by induction in some way, but I dunno. Haven't really thought about it yet.
Here's a derivation without using the recursion.

First, we'll do a simple reformulation. For simplicity, include X as one of the rolled values when we start the game. We'll roll a 1dX at each step but only count it if either:
  • It's equal to the previous minimum roll, and that wasn't 1.
  • OR it's greater than the previous minimum roll.
We stop once every number in 1,2,...,X has been rolled at least once. (Observe that if you strip out the rolls we don't count, then the rolls remaining correspond exactly to rolls in the original problem.)

Let M be the total number of counted rolls made. For k=1,...,X-1, let M_k be the number of counted rolls made after having k distinct roll values so far until (and including) rolling a new value. By linearity of expectation, E[M] = E[M_1] + E[M_2] + ... + E[M_{X-1}]. Write M_k = S_k + G_k where S_k is the count of rolls corresponding to type 1 above and G_k is the count of rolls corresponding to type 2 above.

Deriving S_k: Given that k distinct roll values have been made so far, the probability of 1 NOT being among them is (X-1-k)/(X-1), since there are X-1-k values we haven't rolled yet. In any case, the number of rolls we expect to make equal to the previous minimum before rolling a new distinct value is 1/(X-k) + (1/(X-k))^2 + ... = 1 / (X-1-k). Multiplying, we get E[S_k] = 1/(X-1).

Deriving G_k: Given that k distinct roll values have been made so far, once we roll a new distinct value, there are k+1 distinct values. Since any permutation of those k+1 values where X is the first value is equally likely, the probability that the new value is the minimum is 1/k. So E[G_k] = 1/k.

Thus, E[M] = (X-1)(1/(X-1)) + (1/1 + 1/2 + 1/3 + ... + 1/(X-1)) = 1 + H_{X-1}.
Logged

eHalcyon

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 8689
  • Respect: +9187
    • View Profile
Re: Random Stuff
« Reply #3764 on: June 16, 2014, 06:45:04 pm »
+5

Logged

Ozle

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3625
  • Sorry, this text is personal.
  • Respect: +3360
    • View Profile
Re: Random Stuff
« Reply #3765 on: June 16, 2014, 07:55:45 pm »
+4

0
--------------
Phd
Bsc
B.A



Logged
Try the Ozle Google Map Challenge!
http://forum.dominionstrategy.com/index.php?topic=7466.0

Sullying players Enjoyment of Innovation since 2013 Apparently!

Axxle

  • Torturer
  • *****
  • Offline Offline
  • Posts: 1664
  • Most Valuable Serial Killer
  • Respect: +1966
    • View Profile
Re: Random Stuff
« Reply #3766 on: June 16, 2014, 07:58:55 pm »
+3

0
--------------
Phd
Bsc
B.A




Now that's just cold!
Logged
We might be from all over the world, but "we all talk this one language  : +1 card + 1 action +1 buy , gain , discard, trash... " - RTT

Ozle

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3625
  • Sorry, this text is personal.
  • Respect: +3360
    • View Profile
Re: Random Stuff
« Reply #3767 on: June 16, 2014, 08:07:19 pm »
0

0
--------------
Phd
Bsc
B.A




Now that's just cold!

One point to you i believe
Logged
Try the Ozle Google Map Challenge!
http://forum.dominionstrategy.com/index.php?topic=7466.0

Sullying players Enjoyment of Innovation since 2013 Apparently!

Ozle

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3625
  • Sorry, this text is personal.
  • Respect: +3360
    • View Profile
Re: Random Stuff
« Reply #3768 on: June 16, 2014, 08:10:00 pm »
+1

HIJKLMNO
Logged
Try the Ozle Google Map Challenge!
http://forum.dominionstrategy.com/index.php?topic=7466.0

Sullying players Enjoyment of Innovation since 2013 Apparently!

Ozle

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3625
  • Sorry, this text is personal.
  • Respect: +3360
    • View Profile
Re: Random Stuff
« Reply #3769 on: June 16, 2014, 08:11:16 pm »
0

NO   NO
---------------------
CORRECT
Logged
Try the Ozle Google Map Challenge!
http://forum.dominionstrategy.com/index.php?topic=7466.0

Sullying players Enjoyment of Innovation since 2013 Apparently!

Ozle

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3625
  • Sorry, this text is personal.
  • Respect: +3360
    • View Profile
Re: Random Stuff
« Reply #3770 on: June 16, 2014, 08:14:31 pm »
0

PEEP
Logged
Try the Ozle Google Map Challenge!
http://forum.dominionstrategy.com/index.php?topic=7466.0

Sullying players Enjoyment of Innovation since 2013 Apparently!

pacovf

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3500
  • Multiediting poster
  • Respect: +3839
    • View Profile
Re: Random Stuff
« Reply #3771 on: June 16, 2014, 08:15:37 pm »
+4

I don't get posts #3763 to #3768 (with the possible exception of #3767). Anyone care to make them funnier?
Logged
pacovf has a neopets account.  It has 999 hours logged.  All his neopets are named "Jessica".  I guess that must be his ex.

Ozle

  • Cartographer
  • *****
  • Offline Offline
  • Posts: 3625
  • Sorry, this text is personal.
  • Respect: +3360
    • View Profile
Re: Random Stuff
« Reply #3772 on: June 16, 2014, 08:17:35 pm »
+2

I don't get posts #3763 to #3768 (with the possible exception of #3767). Anyone care to make them funnier?

I can put the in santa hats and pretend they are drunk?
Logged
Try the Ozle Google Map Challenge!
http://forum.dominionstrategy.com/index.php?topic=7466.0

Sullying players Enjoyment of Innovation since 2013 Apparently!

eHalcyon

  • Adventurer
  • ******
  • Offline Offline
  • Posts: 8689
  • Respect: +9187
    • View Profile
Re: Random Stuff
« Reply #3773 on: June 16, 2014, 09:34:32 pm »
+1

I don't get posts #3763 to #3768 (with the possible exception of #3767). Anyone care to make them funnier?

The one with the fifths is Seussian.
The one that is cold isn't that cold.  It's only -3.
The one with the letters is extremely dangerous.
The one with "correct" is in position for a good sniff.

I have no idea what PEEP is.
Logged

WalrusMcFishSr

  • Minion
  • *****
  • Offline Offline
  • Posts: 642
  • An enormous walrus the size of Antarctica
  • Respect: +1793
    • View Profile
Re: Random Stuff
« Reply #3774 on: June 16, 2014, 10:13:03 pm »
+1

Logged
My Dominion videos: http://www.youtube.com/user/WalrusMcFishSr   <---Bet you can't click on that!
Pages: 1 ... 149 150 [151] 152 153 ... 201  All
 

Page created in 0.059 seconds with 18 queries.