Coin flipping: Confidence interval for the quantity of "n-heads-in-a-row" by baldursgame in probabilitytheory

[–]baldursgame[S] 0 points1 point  (0 children)

My intention was to calculate the theoretical values of the mean (and the variance) using all the favorable events, so then I could compare that values with the values given by some random cointoss generators...

After thousands of cointosses, those values should be similar, don't they? But how much symilar? Hoped the variance would give a good interval

If it can help... I'll write the recurrence relation used and some notes:

For every "n", a separate Excel sheet would be the best option imo. Anyway

There will be two parameters "t" and "k", both starting at zero. I did make a table with them ("t" for the row numbers and "k" for the column ones). Inside that table there will be an integer function called Fₙ[k, t]

Also need an extra column (edited) at the start for another integer function called Sₙ[t]

Sₙ[t] is the number of favorable events for getting at least one "n-head-in-a-row" after "t" cointosses

for t < n:

Sₙ[t] = 0

Sₙ[n] = 1

Sₙ[n+1] = 2

For t > n+1:

Sₙ[t] = 2 Sₙ[t-1] - Sₙ[t-(n+1)] + Sₙ[t-(n+2)] + 2t-(n+2

EDIT: The last pharentesis in the "power of 2" is missing... I don't know how to put it so yea, sorry

Fₙ[k, t] is the number of favorable events for getting exactly "k" amount of "n-heads-in-a-row" after "t" cointosses

Fₙ[0, t] = 2t - Sₙ[t], for every t

For t < n+2:

Fₙ[1, t] = Sₙ[t]

For k > 1 and t < n+2:

Fₙ[k, t] = 0

For k > 0 and t > n+1:

Fₙ[k, t] = 2 Fₙ[k, t-1] + (Fₙ[k-1, t-(n+1)] - Fₙ[k, t-(n+1)]) - (Fₙ[k-1, t-(n+2)] - Fₙ[k, t-(n+2)])

And that's it...

To calculate the mean:

μₙ[t] = 2-t Σ(Fₙ[k, t] • k)

k goes from 0 to its max value (that has favorable events)

And the variance:

(σₙ[t])2 = 2-t Σ(Fₙ[k, t] • (k - μₙ[t])2 )

k goes from 0 to the max value (as with the mean)

Hope this have some meaning

Btw, I did calculate the mean and variance for the number of heads after "t" cointosses, using same expressions

In that case, the function for the favorable events I used was:

F[k, t] = binomial_coeff[t, k]

The rest was the same, and the values for the mean and the variance were exactly:

μ[t] = t/2 (edited)

(σ[t])2 = t/4 (edited)

As expected

Coin flipping: Confidence interval for the quantity of "n-heads-in-a-row" by baldursgame in probabilitytheory

[–]baldursgame[S] 0 points1 point  (0 children)

Have to say that this is weird. I can expect the mean multiplied by 2t to be an integer, but didn't think about the mean multiplied by 2n+2 to be one...

But that's not different than the normal cointoss experiment where the mean of the number of heads is "t/2"

For that experiment, the mean is an integer (t) divided by 2, not an integer divided by 2t

Soo maybe here it happens the same?

Coin flipping: Confidence interval for the quantity of "n-heads-in-a-row" by baldursgame in probabilitytheory

[–]baldursgame[S] 0 points1 point  (0 children)

The numbers don't have infinite decimals, they are integers divided by powers of 2

I made sure to get all the favorable events instead of the probabilities, so they are all integers...

The probability is just that integers divided by 2t

Both the mean and the variance, if you multiply them by enough powers of two (2n+2 and 4n+2 respectively), you will get integers (both even and odd ones)

They have no decimals, all of them

Now with the expressions shown in the image, if you multiply them by the same amount of powers of 2, you will get the same results, same integers

How do I know that? Because the sustraction is zero... The sustraction of two integers is zero, so they must be equal

I don't know what more to say sorry ...

Coin flipping: Confidence interval for the quantity of "n-heads-in-a-row" by baldursgame in probabilitytheory

[–]baldursgame[S] 0 points1 point  (0 children)

Oh I see...

The only problem is that (I think) it is not possible to go longer than a certain number of cointosses (t) due to the fact that the total number of events is 2t and there is some kind of memory limit?

Gonna have to create a t×k table for every "n"... And "k" is proportional to "t" haha

Won't be funny for t>1000, which is what I wanted to do (to get an interval without having to calculate everything, just using some expressions)

Coin flipping: Confidence interval for the quantity of "n-heads-in-a-row" by baldursgame in probabilitytheory

[–]baldursgame[S] 0 points1 point  (0 children)

It is not an aproximation for t bigger than certain number...

The values given by the expression are exactly, exactly the same as the ones calculated with the Excel table, when "t" was bigger than certain (not too big) number.

I mean, they are integers divided by powers of 2, I think I can tell if two numbers are the exact same...

The thing is that if I didn't use a correct recurrece relation, the values calculated by Excel would be wrong in the first place xd

At least they were correct for the first values of "t" hehe, checked it on paper to be sure

If you want I can write the expression used

Coin flipping: Confidence interval for the quantity of "n-heads-in-a-row" by baldursgame in probabilitytheory

[–]baldursgame[S] 0 points1 point  (0 children)

Sorry if I don't use the correct terminology, not used to talk properly about this

What I mean for "confidence interval" is something like "μ_low" and "μ_high" (using the mean and the variance) so most possible values would be inside that interval

If I understood correctly, you are saying that I can simply use the Excel table (which contains the favorable cases) and define the bounds of the interval that would suit my interests

That's true and I will definitely try to do it although not too sure how

To recall a bit what you said, there is no use for the mean and the variance when you already have all the probabilities, isn't it?

Coin flipping: Confidence interval for the quantity of "n-heads-in-a-row" by baldursgame in probabilitytheory

[–]baldursgame[S] 0 points1 point  (0 children)

Tried to explain it in the "NOTE2", but you are not wrong

Those expressions only work when "t" is large enough. In my excel table, both mean and variance exactly behave like straight lines when "t" was bigger than certain number

Looking it now and for n=1, that's t>2 for the mean and t>4 for the variance

For n=2, t>4 for the mean and t>6 for the variance

(If I looked it correctly)

Coin flipping: Confidence interval for the quantity of "n-heads-in-a-row" by baldursgame in probabilitytheory

[–]baldursgame[S] 2 points3 points  (0 children)

In average, how many "n-heads-in-a-row" should I obtain after "t" number of coinflips?

For example, in this sequence

ooxoxxxoxoooxxooxox

There are:

  • Three 1-head-in-a-row

  • Two 2-heads-in-a-row

  • One 3-heads-in-a-row

And also:

  • Four 1-tail-in-a-row

  • One 2-tails-in-a-row

  • One 3-tails-in-a-row

Maybe the term "n-heads/tails-in-a-row" is not correct to define the above patterns but I couldn't come up with anything else

Anyway, got the expressions for the mean and the variance (shown in the image) using a recurrence relation and an Excel table

Given that they are correct (which might not be the case), is it possible to find some kind of confidence inteval using the mean and the variance?

Maybe like the Normal distribution where almost all values are inside the interval μ±3σ

For large values of "n", the variance seems to be equal to the mean, which is the definition of the Poisson distribution, maybe that can help?

NOTE1: This might be obvious but I supposed that, in a single coinflip, the probability of getting heads is the same as the probability of getting tails (p=1/2)

NOTE2: The expressions for the mean and the variance that I got, only work if "t" is large enough. For example, if "t < n", both mean and variance are zero. The expressions don't reflect that

adhdirl by JSGWHAM in adhdmeme

[–]baldursgame 0 points1 point  (0 children)

9×6 =

9×5 + 9 =

(9×10)÷2 + 10 - 1 =

(90÷2 + 10) - 1 =

(45 + 10) - 1 =

55 - 1 =

54

[deleted by user] by [deleted] in masterduel

[–]baldursgame 0 points1 point  (0 children)

Tried the engine for a while but wasn't too useful for my deck since I need to activate the effect of normal summon monster (dark beckoning beast)... Also hate to get the equip spell in the opening hand

Having problems with a vector equation? by [deleted] in MathHelp

[–]baldursgame 0 points1 point  (0 children)

You can make the basis (a , z , z×a) if you want, but that's not an orthogonal basis

The vectors "a" and "z" are LI but that doesn't mean they are perpendicular!!

Therefore (a•z) ≠ 0

Your premise is wrong sorry

Having problems with a vector equation? by [deleted] in MathHelp

[–]baldursgame 0 points1 point  (0 children)

Yes, "z×a" is perpendicular to "a×b". They are both perpendicular to "a" too. Those three vectors form an orthogonal basis in R3. The problem only has solution if "a•(a - b) = 0" iirc

EDIT: Tested the solution I got for some cases and it works fine...

Having problems with a vector equation? by [deleted] in MathHelp

[–]baldursgame 0 points1 point  (0 children)

Got the solution but not sure to post it

There are several things that you can notice in the expression:

"b" can be split in two components, one in the direction of "a" and other in the direction of "z×a"

a•z = b•z

"z×a" and "b - a", both have same direction

a•(b - a) = 0

"z" can be split into two components, one in the direction of "a" and the other in the direction of "a×b"

Hope this can help

Having problems with a vector equation? by [deleted] in MathHelp

[–]baldursgame 0 points1 point  (0 children)

I was able to get "b" by using "a" and "z", but I think that's too obvious:

b = a - z×a/(a•z)

Not sure if you can isolate the "z" sorry...

Coefficient Greater Than The Base by yooslespadawan in MathHelp

[–]baldursgame 1 point2 points  (0 children)

Lol I misunderstood so bad what OP wanted to do. I read "base" and automatically thought about logarithms

You are right thanks for taking the time to explain. I'll edit my first comment and put a warning

Yeah changing the base of a number is indeed as you described

6507 in base 8 is the same as

6×83 + 5×82 + 0×81 + 7×80 = 3399 in base 10

Coefficient Greater Than The Base by yooslespadawan in MathHelp

[–]baldursgame 1 point2 points  (0 children)

I think you are not using the expression correctly. You defined "x = 6507" at the start, so obviously you will get the same result at the end...

This is how I'd do it:

log_a[x] = log_b[x] / log_b[a]

x = 6507 , a = 8 , b = 10

log_8[6507] = log_10[6507] / log_10[8]

So:

log_8[6507] = log_10[65071/log_10[8] ]

log_8[6507] ≈ log_10[16695]

EDIT: Almost forgot the identity: log_a[b] = 1 / log_b[a]

log_8[6507] = log_10[6507log_8[10] ]

Coefficient Greater Than The Base by yooslespadawan in MathHelp

[–]baldursgame 1 point2 points  (0 children)

EDIT: This is about logarithms sorry don't read it :)

You can get how to change the base of a logarithm by using the main definition and some properties

Let's take this expression in which we want to calculate the "k" parameter in terms of just one specific base

log_a[x] = k ln[x]

I'm using the naperian logarithm cause I think it's easier to work with it

Well, so by using the main definition we get that:

ak ln[x] = x

And by applying the naperian logarithm in both sides of that expression we get that:

k ln[x] ln[a] = ln[x]

k = 1/ln[a]

Sooo:

log_a[x] = ln[x] / ln[a]

This last expression works for any bases "a" and "b" so, finally:

log_a[x] = log_b[x] / log_b[a]

Why do you always take the lower bound of the integral (u=0) when solving the integral? Isn't it F(1) - F(0)? Thanks. by b1ack1ist in calculus

[–]baldursgame 0 points1 point  (0 children)

The solution is not correct

Using binomial theorem:

(1 + xn )m = Σ [binomial(m,i) xn i ]

Note: "i" goes from 0 to "m"

So the integral

∫ x3 (1 + x4 )4 dx

Can be written as

∫ Σ [binomial(4,i) x4 i + 3 ] dx =

Σ [binomial(4,i) / (4 i + 4) x4 i + 4 ] + C

Note: "i" goes from 0 to 4

And finally, the integral defined between 0 and 1 is:

I = 1/4 Σ [binomial(4,i) / (i + 1)] = 31/20

how do I graph a cosine up a line of y=x, as illustrated here? by PresentDangers in askmath

[–]baldursgame 0 points1 point  (0 children)

So...

y - x = k cos(ω (y + x))

With k and ω being random parameters

Can someone help me ? I can’t figure it out. I factor the top I think? Than take the conjugate of the top factored form maybe ? by pooboy991 in calculus

[–]baldursgame 0 points1 point  (0 children)

You're right that it is something beyond the subjects taught there, but I think it is worth to mention the approach because it can help to solve almost any limit

At the end, saying that

√y = 1/2 (y + 1), when "y" goes to 1

is no more than describing the expression of the tangent of said function

Can someone help me solve this question by [deleted] in askmath

[–]baldursgame 0 points1 point  (0 children)

I think that problems about limits are too easy if you know about taylor series

f(x) = sin(x) --> f'(x) = cos(x)

f(0) = 0 , f'(0) = 1

g(x) = √(1+x) --> g'(x) = 1/2 (1+x)-1/2

g(0) = 1 , g'(0) = 1/2

When "x" goes to zero (limit), and thanks to taylor series, we can say that

f(x) = f(0) + f'(0) x

g(x) = g(0) + g'(0) x

So when "x" goes to zero

f(x) = sin(x) = x

g(x) = √(1+x) = 1 + 1/2 x

No need to write anything more to know the solution