probability question!!thanks!!

2007-01-27 8:16 am
let n be a positive integer. A random sample of 4 elements is taken from the set {0,1,2..n}, one at a time and with replacement . what is the probability that the sum of the first two elements is equal to the sum of the last two elements?

the correct answer should be (2n^(2)+4n+3)/( 3(n+1)^(3))
but what I think is:( the sum of (i+1)^2 from i=0 to i=2n)/(n+1)^4
are these two answers the same?otherwise, how to get the correct answer?thanks guys!

回答 (2)

2007-01-27 8:34 pm
✔ 最佳答案
(Sum of i² from i=1 to i=n) ≡ n (n+1) (2n+1) / 6, for all natural number n.
[You can prove it by mathematical induction.]

What you think is:
(sum of (i+1)² from i=0 to i=2n)/(n+1)^4
But,
(sum of (i+1)² from i=0 to i=2n)/(n+1)^4
= (sum of i² from i=1 to i=2n+1) / (n+1)^4
= [ (2n+1) (2n+2) (4n+3) / 6 ] / (n+1)^4
= (8n² + 10n + 3) / 3(n+1)³,
which differs from the correct answer!

My calculation is as follows:

Sum of first 2 samples: 0, 1, 2, ... , n-1, n , n+1, ... , 2n-2, 2n-1, 2n
Freq. of occurrence  : 1, 2, 3, ... , n , n+1, n, ... , 3 , 2 , 1
(Reasoning:
If the sum = r where 0 ≤ r ≤ n,
permutations are: r+0, (r-1)+1, (r-2)+2, ... , 0+r.
i.e. total no. of terms = r+1.
If the sum = 2n-r where 0 ≤ r < n, i.e. n < n+r ≤ 2n,
permutations are: n+(n-r), (n-1)+(n-r+1), (n-2)+(n-r+2), ... , (n-r)+n.
i.e. total no. of terms = r+1. )

Similarly,
Sum of last 2 samples: 0, 1, 2, ... , n-1, n , n+1, ... , 2n-2, 2n-1, 2n
Freq. of occurrence  : 1, 2, 3, ... , n , n+1, n, ... , 3 , 2 , 1

Therefore,
Sum of first 2 samples & sum of last
 2 samples are BOTH: 0 , 1 , 2 , ... , n-1, n  , n+1, ... , 2n-2, 2n-1, 2n
Freq. of occurrence  : 1², 2², 3², ... , n² , (n+1)², n² , ... , 3² , 2² , 1²

Sum of "frequency of occurrence"
= [1² + 2² + 3² + ... + n² + (n+1)²] + [1² + 2² + 3² + ... + n²]
= [(n+1) (n+2) (2n+3) / 6] + [n (n+1) (2n+1) / 6]
= (n+1)/6 . [(n+2) (2n+3) + n (2n+1)]
= (n+1) (2n² + 4n + 3) /3
Therefore,
probability = [(n+1) (2n² + 4n + 3) /6 ] / (n+1)^4
     = (2n² + 4n + 3) / [3 (n+1)³]
 which is same as the correct answer as suggested.
2007-01-27 8:01 pm
Your idea is correct, but your formula is wrong.

You sum from i = 0 to 2n. However, think about when can the first two sum and last two sum equal 2n?? only 1 possible choice, not 2n+1 choices!!
so actually it is:
i=0: no. of ways: 1^2
i=1: no. of ways: 2^2
i=2: no. of ways: 3^2
...
i=n: no. of ways: (n+1)^2
**i=n+1: no. of ways: n^2
**i=n+2: no. of ways: (n-1)^2
...
**i=n: no. of ways: 1^2

Therefore it should be: 1+2^2+...+n^2 + (n+1)^2 + n^2 + (n-1)^2+...+1^2

using formula Sum i^2 (i=1 to n) = n(n+1)(2n+1)/6, the above becomes"

S(n) + S(n+1)
=n(n+1)(2n+1)/6 + (n+1)(n+2)(2n+3)/6
= 2(n+1)(2n^2+4n + 3) /6

divide by (n+1)^4 and simplify will give you the correct answer.

2007-01-27 12:02:46 補充:
the last one should be...**i=2n: no. of ways: 1^2


收錄日期: 2021-05-01 19:02:22
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070127000051KK00066

檢視 Wayback Machine 備份