Subject:
|
Re: math question (or pattern... whatever...)
|
Newsgroups:
|
lugnet.off-topic.geek
|
Date:
|
Mon, 3 Mar 2003 21:13:50 GMT
|
Viewed:
|
561 times
|
| |
 | |
On Mon, Mar 03, 2003 at 08:54:01PM +0000, David Koudys wrote:
> r(1) r(2)
> r(1) b
> r(1) w
> r(2) b
> r(2) w
>
> (b w being still eliminated due to red already being in your hand) that a
> last possible combination:
>
> r(2) r(1)
>
> fits into the mix, so 2 out of 6, which still equals 33 percent
>
> Any stats people out there that could shed logic on this?
I'm not a stats person, but I agree with your friend. r(2) r(1) is the
same as r(1) r(2), because order doesn't matter. If it does, then you
end up with more combos (w r(2), etc)...
--
that's what I was going to say. But, I decided to run a small
simulation:
$ perl -le '
$rr = 0;
$count = 0;
for (1..10000) {
$count ++;
@bag = qw/r r w b/;
$hand = "";
for (1..2) {
$pos = int(rand($#bag));
$hand .= $bag[$pos];
splice @bag, $pos, 1;
}
$rr++ if $hand eq "rr"
}
print "$rr/$count = ", $rr/$count;
'
3391/10000 = 0.3391
so, once again, I learn I don't quite understand statistics as I think
I do. :)
--
Dan Boger
dan@peeron.com
|
|
Message has 2 Replies:  | | Re: math question (or pattern... whatever...)
|
| (...) I don't quite get why this works-- if you're doing rand($#bag), won't that always pick r, r, or w for the 1st value? Hence, theoretically, you could pick "wb", which isn't in your sample set... on the other hand, you're increasing the chance (...) (22 years ago, 3-Mar-03, to lugnet.off-topic.geek)
|
Message is in Reply To:
 | | math question (or pattern... whatever...)
|
| k, here's something that came across my desk... you have a bag with 4 marbles in it. 2 of the marbles are red 1 marble is white 1 marble is blue you reach in and grab 2 random marbles you open up your hand a bit to only see the colour of one of (...) (22 years ago, 3-Mar-03, to lugnet.off-topic.geek)
|
61 Messages in This Thread:         
        
      
    
      
              
       
       
             
                   
            
       
           
           
         
             
      
     
    
  
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|