Two Plus Two Older Archives

Two Plus Two Older Archives (http://archives2.twoplustwo.com/index.php)
-   Probability (http://archives2.twoplustwo.com/forumdisplay.php?f=23)
-   -   Rand Var, CI problem (http://archives2.twoplustwo.com/showthread.php?t=402751)

jon_1van 12-21-2005 12:07 PM

Rand Var, CI problem
 
So I'm trying to make a program similar to pokerstove, but for stud instead.


Assume my program generates a string of numbers like : -2, -2, -2, 10, -2, 10..... (ie lose 2 bets with some frequency and gain 10 bets with some frequency)



What I'd like to do is report the expected value of that stream within a certain confidence interval that the user specifies (say within .05 big bets)



Is the following approach valid ::

-Compute sample varience = 1/(n-1) * SUM( Xi - XBAR)
-Sample SD = sqrt(sample varience)

Lets assume the CI is 5 standard deviations big (2.5 SD on either side of the true E[x])

Now all I have to do is generate random number from the stream until the Sample SD = .02 BB.

Is this valid? Is it close enough?

jon_1van 12-21-2005 06:09 PM

bump
 
anybody?

alThor 12-21-2005 11:12 PM

Re: bump
 
Close enough.

1. In principle, you shouldn't decide on an interval size first, and determine n later, on the fly. Instead, determine a (large) sample size first, then construct the interval. But this isn't a biggie. Technically it would induce a bias, but it'd be so small you'd never notice.

2. If you know the output only takes on two possible values, you should use a slightly different sample variance formula. (In effect, divide by n instead of n-1.) Again, this isn't a biggie. When n is large, it is roughly equal to n-1.

alThor

AaronBrown 12-21-2005 11:27 PM

Re: Rand Var, CI problem
 
I don't understand the problem.

If your program generates the stream, then you can compute the expected value unless the program is extremely complex.

If that's impossible, you can use something like your approach, but your formulae are wrong.

If you assume that the individual values are independent and there are enough values that the Normal approximation is value (at least 30, unless you have some extreme values that show up very rarely), then the standard deviation of Xbar is approximately:

{Sum[(Xi - Xbar)^2]}^0.5/n


All times are GMT -4. The time now is 12:48 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.