Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Sample Probabilities

by davido (Cardinal)
on Dec 07, 2006 at 17:28 UTC ( [id://588403]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    my( @sample ) = @entity{ 8, 8, 3, 1, 5, 0, 0 };
    
    my $prob = probability( \@entity, \@sample );
    
  2. or download this
    sub probability {
        my $entity_count = @{$_[0]};
        my $sample_count = @{$_[1]};
        return( ( 1 / $entity_count ) ^^ $sample_count );
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://588403]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (9)
As of 2024-04-18 13:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found