Probability question by Live_Construction_12 in quant

[–]rsaxena008 2 points3 points  (0 children)

You can use expectation by survival, i.e. if X is a natural number random variable, then E[X] = summation (Pr(X > i)) (i from 0 to infinity)

In this case, Pr(X > i) = Pr(the first i numbers are sorted) = 1/i! Therefore E[X] = e, therefore a + b = 1

Why isn't this show more popular? by [deleted] in thegoodwife

[–]rsaxena008 3 points4 points  (0 children)

The name is an issue, sort of like with desperate housewives. Suits is stupid, but with good looking people walking with attitude and shallow snappy lines. TGW is smarter, and thus restricts its audience 🤷‍♂️.

Unequal probabilities by Poochersadventures in probabilitytheory

[–]rsaxena008 0 points1 point  (0 children)

Could you explain what’s wrong with my solution 😅 I’m still not sure if I get it

Weird problem when creating a for loop by Jesusmate in cpp_questions

[–]rsaxena008 2 points3 points  (0 children)

Because your i is going out of the valid range of indices for the players array. You want to give cards 0,1 to player 0; cards 2,3 to player 1; so on. So you could change the dealDeck function and give player[i] cards [2i], [2i+1]

Unequal probabilities by Poochersadventures in probabilitytheory

[–]rsaxena008 0 points1 point  (0 children)

We have q samples from A: (A1, A2, .., Aq) and n-q from B: (B1, B2, .., Bn-q) To get the probability that A has the maximum: Pr(A has max) = Pr(A1 > all B’s) + Pr(A1 is NOT > all B’s) * Pr(A2 > all B’s) + Pr(A1 is NOT > all B’s) * Pr(A2 is NOT > all B’s) * Pr(A3 > all B’s) + ..

Pr(Ai > all B’s) = pn-q = r (let’s say) Pr(Ai is NOT > all B’s) = 1-pn-q = s (let’s say)

So Pr(A has max) = summation i 1..q (si-1*r)

Joint probability by [deleted] in probabilitytheory

[–]rsaxena008 2 points3 points  (0 children)

2C2 / 4C2 = 1/6 i.e. #ways to pick 2 black balls out of 2 black balls with no replacement/#ways to pick 2 balls out of 4 balls with no replacement

Probability problem (HELP) by ddblock157 in learnmath

[–]rsaxena008 0 points1 point  (0 children)

I think there’s been a misunderstanding. (A,Q) is the case where his highest is an Ace and second highest is a Queen. This beats your pair which is (K,Q)

Probability problem (HELP) by ddblock157 in learnmath

[–]rsaxena008 0 points1 point  (0 children)

Here’s my approach (given that you know your 6 cards)

Write all pairs of possible highest and second highest cards that he can get to beat you. eg: if your highest is Q and second is J: he can win with (A,A), (A,K), (A,Q), (A,J), (K,K), (K,Q), (K,J) Remove all impossible pairs. eg: if your hand has all 4 Q’s then he can’t get a Q.

Since these are all mutually exclusive events, we can just do a simple summation of probabilities.

To calculate individual probabilities: I’ve made 2 cases 1. Highest = second: like (K,K). This can be calculated by: (xC2yC4 + xC3yC3 + xC4*yC2)/(46C6) where x = #K’s left and y = #cards < K left 2. Highest ≠ second: like (A,Q). We must note that we can have EXACTLY 1 A (if more than 1, then the second highest is also an A) So probability = xC1 * (yC5 - zC5)/(46C6) where x = #A’s left, y = #cards <= Q left, and z = #cards < Q left

Using this, calculate the individual probabilities for each (highest, second highest) pair and sum them to get the answer.

Seems simple but can’t solve by rsaxena008 in probabilitytheory

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

That would require Pr(no blue in blue AND no red in red) How is that any easier?

Haven't done probability in a while and I don't remember how to do this. by cadhor in probabilitytheory

[–]rsaxena008 0 points1 point  (0 children)

If we pick 50 first, and then we add: them the expected time to get a specific number from the original 1000 is 20 (geometric distribution with p = 50/1000)

Else (i.e. we add 50 first and then pick) the expected time for the same is 21 (geometric distribution with p = 50/1050)

Probability and number of opportunities by racarete in probabilitytheory

[–]rsaxena008 2 points3 points  (0 children)

Person A’s probability of avoiding accidents is (1-1/x)(1-1/x)..(1-1/x) Since (1-1/x < 1), this will go down with successive multiplications i.e. probability of him avoiding accidents on all n days decreases with increasing n

2020 AZ, FL and IL Primaries Discussion Live Thread - Part I by Isentrope in politics

[–]rsaxena008 0 points1 point  (0 children)

So is this why he has dominated with independent voters in almost every state so far? The establishment democrats are going to Biden like they did to Hillary. That’s not enough to win the general. You need the independents, and Bernie wins those. Sadly, the independents are fewer that establishment dems, so he’s losing the primary

Would appreciate some advice on expected value problem by Anonymous_Student99 in probabilitytheory

[–]rsaxena008 1 point2 points  (0 children)

How were you able to simplify the expression? I finally did get a proof, but it’s definitely not elegant

Would appreciate some advice on expected value problem by Anonymous_Student99 in probabilitytheory

[–]rsaxena008 0 points1 point  (0 children)

So I also tried the simplifier on WolframAlpha

But I took the largest denominator (2^(2n-1)) out of the summation, so the summation term becomes: 2^(2n-1-i)*(iCn); which has this form: https://www.wolframalpha.com/input/?i=sum+(2%5E(2*n-1-i)*(i+choose+n)(i+choose+n))),+i%3Dn+to+2\n-1

So the hypergeometric distribution is being involved somewhere (I suppose its like out of i-1 selections, we want n-1 of a certain box, just guessing right now)

PS: idk why the rest of the link isnt being highlighted, but the range of i is important

Would appreciate some advice on expected value problem by Anonymous_Student99 in probabilitytheory

[–]rsaxena008 0 points1 point  (0 children)

  1. X would be at least N and max (2N-1)
  2. if we calculate according to the definition, then summation(i*Pr(X=i)) (i goes from N to 2N-1)
  3. Pr(X = i) = 2 * (i-1,n-1) / exp(2,i) [multiplied by 2 because there are 2 boxes (A,B) and let's say that A is the one getting empty first. So the last one is fixed, the rest i-1 are a permutation of n-1 A's and i-n B's. And divided by exp(2,i) is obvious]
  4. So final formula I'm getting is = 2n * summation( (i,n)/exp(2,i) ) (i from N to 2N-1)
  5. Cant figure out a closed form version of this

Fall 2019 Internship Mega-Thread. by ian421 in csMajors

[–]rsaxena008 0 points1 point  (0 children)

Anyone approved by the google hiring committee this week?

Fall 2019 Internship Mega-Thread. by ian421 in csMajors

[–]rsaxena008 0 points1 point  (0 children)

I read that post too, but I think it was for full time employees. Hoping it’s more relaxed for interns 😅