All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Probability
Don't try this barefoot. (Posted on 2011-12-01) Difficulty: 3 of 5
You have a box of tacks for which it has been determined that if you toss them on the floor precisely 36% will land point up.

How many of these tacks could you toss to make the most likely result be that 10 of them will land point up.

No Solution Yet Submitted by Jer    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Another programatic solution Comment 3 of 3 |
Python program:

from math import factorial
a = .36
nmax = 40
heads = [0 for k in range(nmax)]
for n in range(nmax):
    heads[n] = [0 for j in range(n+1)]
    for i in range(n+1):
        comb = (factorial(n) / (factorial(i) * factorial(n-i)))
        heads[n][i] =  comb * a**i * (1-a)**(n-i)
        if i == 0:
            max_prob = 0
            maxi = 0
        else:
            if heads[n][i] > heads[n][i-1]:
                max_prob = heads[n][i]
                maxi = i
            elif heads[n][i] == heads[n][i-1]:
                print('tie:', i-1,i)
    print(n,maxi)

Outputs the following:
0 0
1 0
2 1
3 1
4 1
5 2
6 2
7 2
8 3
9 3
10 3
11 4
12 4
13 5
14 5
15 5
16 6
17 6
18 6
19 7
20 7
21 7
22 8
23 8
24 8
25 9
26 9
27 10
28 10
29 10

30 11
31 11
32 11
33 12
34 12
35 12
36 13
37 13
38 14
39 14

  Posted by Larry on 2020-01-15 09:16:14
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2020 by Animus Pactum Consulting. All rights reserved. Privacy Information