Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 40036

A probability provides a quantitative description of the likely occurrence of a particular event.

5 votes

Probability that exactly y of n rolls of an r-sided die are unique

Then the probability that you see exactly $y$ unique values when you roll a $k$-sided dice $n$ times is: $$ Pr(Y=y) = \frac{{k\choose y}{n\choose y}y! …
josliber's user avatar
  • 4,389
1 vote
Accepted

Given two means and deviations, how can I compute the probability that x < y?

Therefore your desired probability can be obtained from the standard normal cdf: $\mathrm{Pr}(X-Y < 0) = \Phi(\frac{\mu_Y-\mu_X}{\sqrt{\sigma^2_X+\sigma^2_Y}})$. …
josliber's user avatar
  • 4,389
3 votes
Accepted

Proof for probability of union of n events

What you are describing is the inclusion-exclusion principle in probability. $S_k$ is sum of the probability of all k-cardinality intersections among your sets. …
josliber's user avatar
  • 4,389
0 votes
Accepted

Are two uncorrelated Rademacher rv always independent?

You could summarize your $E[XY] = 0$ result with $P(X=Y) = P(X\neq Y) = 0.5$. You could proceed with: \begin{align*} 2P(X=1,Y=1) &= P(X=1) + P(Y=1) - P(X\neq Y) \\ &= 0.5 + 0.5 - 0.5 \\ &= 0.5 \end{ …
josliber's user avatar
  • 4,389
2 votes
Accepted

distribution of r.v. when it's broken down in binomials

However, a simple example can also illustrate the point -- let $B$ be a discrete random variable that takes value 0 with probability 0.5 and 1000 with probability 0.5. Whenever $B=0$, then $A=0$. …
josliber's user avatar
  • 4,389
2 votes
Accepted

Joint expectations in Python or R

You can rather easily approximate the expected value of $f(X)g(Y)$ using simulation. For instance, here is the R code to simulate the expected value of $X^2e^Y$ with $\rho = 0.2$ using 1 million sampl …
josliber's user avatar
  • 4,389
1 vote

How to do the Proof of P(A ∪ (B ∩ C))?

One way to approach this algebraically is to note that $Pr(a) = E[A]$, where $A$ is a random variable that takes value 1 when event a occurs and 0 when event a does not occur. Logical expressions with …
josliber's user avatar
  • 4,389
5 votes
Accepted

Probability of n-bit sequence appearing at least twice in m-bit sequence

As @NeilG stated in the comments, the desired probability can still be computed exactly by defining a (2n+1)-state markov chain and computing the probability of having seen 2 copies of $\alpha$ after m …
josliber's user avatar
  • 4,389
2 votes

Probability of n-bit sequence appearing at least twice in m-bit sequence

Summing over all suffixes, we get the following upper bound expression for the probability of at least two occurrences of $\alpha$: $$2^{-2n-1}(m-2n+2)(m-2n+1) + \sum_{s\in S} 2^{-n-|s|}(m-n-|s|)$$ This … 1) + sum(sapply(s, function(i) 2^(-n-i)*(m-n-i))) } else { 2^(-2*n-1)*(m-2*n+2)*(m-2*n+1) } } With a few examples we can see that it is a reasonable upper bound in cases where we have a low probability
josliber's user avatar
  • 4,389
2 votes
Accepted

How to calculate $P(A)$ given $P(A|B)$ and with B a continuous variable and $P(B)$ being a n...

Mathematically, it sounds like you have the following piecewise linear function for $P(A=1~|~B=t)$: $$P(A=1~|~B = t) = \left\{\begin{array}{ll} 0 & \text{if}~t < T^- \\ \frac{t-T^-}{2(T-T^-)} & \tex …
josliber's user avatar
  • 4,389
4 votes
Accepted

Integration of product of functions of "x" with exponents/powers (binomial problem)

To approach this, I would apply the binomial theorem, which holds for non-negative integer $c$: $$ (a+b)^c = \sum_{i=0}^c {c\choose i} a^ib^{c-i} $$ When you apply this identity to $(1-x)^{n-y}$, th …
josliber's user avatar
  • 4,389
1 vote

exact value runtime for coin flip algorithm

As you note, the probability of finishing at step $i$ (for $i\in\{1, 2, \ldots, A-1\}$) is $(1/2)^i$. … By summing these values, we see that the probability of finishing in steps 1 through $A-1$ is $1 - (1/2)^{A-1}$. As a result, the probability of finishing in the last step is $(1/2)^{A-1}$. …
josliber's user avatar
  • 4,389
2 votes
Accepted

Statistics - which distributions fit the description

I guess it's easy to check our work for discrete random variables: \begin{align*} X &= 6000 \\ Y &= \left\{\begin{array}{cc} 6000 & \text{with probability 0.6} \\ 1000 & \text{with probability 0.4}\end …
josliber's user avatar
  • 4,389
14 votes
Accepted

Probability of each of the three Christmas puddings having exactly 2 coins

Call the number of pieces in each section $A$, $B$, and $C$. Because $A+B+C=6$, you are interested in $Pr(A=2, B=2) = Pr(B=2|A=2)Pr(A=2)$. $Pr(A=2)$ is a simple binomial calculation: $A\sim Binom(6, …
josliber's user avatar
  • 4,389
2 votes

Effectiveness of Random Sampling : With Replacement vs. Without Replacement

In this common scenario, the probability of ever randomly sampling the same solution twice approaches 0. …
josliber's user avatar
  • 4,389

15 30 50 per page