Code covered by the BSD License  

Highlights from
Coin And Dice

Be the first to rate this file! 5 Downloads (last 30 days) File Size: 2.39 KB File ID: #23448

Coin And Dice

by Rodolphe Sitter

 

27 Mar 2009

Simulate the average number of tosses of coin/throws of dice to get a given sequence.

| Watch this File

File Information
Description

Compute the estimated average number of coin tosses (or dice throws) to get a given sequence of Heads-and-Tails (or a sequence of intergers ranging from 1 to 6)

The inputs are:
- The Sequence (row vector)
- The Number of Monte-Carlo Simulations

The outputs are the estimated (Monte-Carlo) expectation of number of tosses/throws to get the input sequence, along with the standard deviation of the error (due to the randomness of the simulation)

MATLAB release MATLAB 7.5 (R2007b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
coin Rodolphe Sitter 27 Mar 2009 16:26:25
toss Rodolphe Sitter 27 Mar 2009 16:26:25
dice Rodolphe Sitter 27 Mar 2009 16:26:25
random Rodolphe Sitter 27 Mar 2009 16:26:25
monte Rodolphe Sitter 27 Mar 2009 16:26:25
simulation Rodolphe Sitter 27 Mar 2009 16:26:25
carlo Rodolphe Sitter 27 Mar 2009 16:26:25
monte parul mathuria 03 Aug 2011 03:05:42
carlo parul mathuria 03 Aug 2011 03:05:44
simulation parul mathuria 03 Aug 2011 03:05:46

Contact us at files@mathworks.com