Wikipedia:Reference desk/Archives/Mathematics/2014 November 30
Mathematics desk | ||
---|---|---|
< November 29 | << Oct | November | Dec >> | December 1 > |
Welcome to the Wikipedia Mathematics Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
November 30
[edit]Permutations of N unique numbers subject to constraints
[edit]- When V = N - 1, the answer isn't N - 1 but the V th triangular number. The iteration is shown in the material of sequence A130534 in OEIS. X(0, 0) = 1, X(N, V) = 0 if V > N, X(N, V) = X(N - 1, V - 1) + (N - 1) * X(N - 1, V) →86.171.209.142 (talk) 21:26, 30 November 2014 (UTC)
- Thank you so much! WinterWall (talk) 23:58, 30 November 2014 (UTC)
Probability question involving simulations of picking balls from a bag
[edit]I’m working on a chemistry problem, which essentially translates to finding the answer to a related probability problem. However, my knowledge in probability is very limited and I'd be grateful if someone could help me out with it. The following is the problem:-
Suppose I have a bag containing red balls and blue balls. For the purpose of illustration, let’s call them s (red balls) and s (blue balls). Now, I am going to pick one ball at a time from this bag, without replacement. I define a run to be a sequence of consecutive s (or alternately, s) picked, along with the first (or ) that is picked. And I define a red (or blue) run length to be the number of consecutive s (or s) I pick in a run, before I encounter a (or ) or until the number of balls run out.
As examples, is a run (for simplicity, let me denote it by in shorthand) with red run length , is a run (denoted by ) with red run length , is a run (denoted by ) with blue run length .
In each simulation, I keep doing runs until all the balls are picked out (since the balls are picked without replacement, the number of runs and the red/blue run lengths are both finite).
Let’s look at a typical simulation of ball-picking: . In this simulation, there are runs. The first run consists of consecutive red balls, until a blue ball is encountered. The second run consists of consecutive red balls until a ball is encountered. The third run consists of consecutive blue balls until a red ball is encountered. And the last run consists of consecutive red balls, and the simulation ends as there are no more balls to be picked.
It is easy to see that the minimum possible number of runs is (attained by followed by , or followed by ) and the maximum possible number of runs is (attained by times followed by , or times followed by ).
Also, the maximum possible value of red run length is and that of blue run length is .
Now, I’m interested in knowing the probability distribution of the red and blue run lengths. For this, I believe that I must first find the expected value of the number of runs in a simulation. But I’m not sure how to proceed from here. So to sum up, the following are my questions:-
. How do I find the expected value of the number of runs in a simulation?
. For that expected value, how do I calculate the probability distribution of red and blue run lengths?
--Jobsism10 (talk) 10:29, 30 November 2014 (UTC)
- I don't think your suggested method of first finding the expectation of total number of runs, then use that to find the value for each type of run, will work.
- Instead, I'd define as the expected number of times that run X will appear in a simulation with b blue balls and r red balls. Then you have:
- With some edge cases, and likewise for blue runs. Then I'd solve this using recursion (with memoization).
- If you then want the expected number of runs, you can sum up these values over all kinds of runs.
- (I haven't spent a lot of time verifying the above so there could be errors.) -- Meni Rosenfeld (talk) 15:21, 30 November 2014 (UTC)