0
   

How to perform Matlab for the biased coin toss simulation

 
 
vokoyo
 
Reply Sat 21 Apr, 2018 02:44 pm




Let the bias be the probability of turning up a head and denoted by the parameter q.

If we use a coin with the bias specified by q to conduct a coin flipping process d times, the outcome will be a sequence of heads and tails.

Then the probability - where nH is the number of heads turned up during d trials.

Now using such a simulated coin with q = ½ to conduct the experiments based on a sequence of outcomes generated by the random generator from computer.

For example, if the number generated by the random generator is less than 1/2, it assigned to be 0; otherwise, it will be assigned 1.

I would like to perform the Matlab programming with certain parameters for the Pattern Recognition (Binomial Distribution) as below -

(1) d = 100 and n =100 using a simulated coin with q = ¼ and ½.

(2) d = 10 and n =1000 using a simulated coin with q = ¼ and ½.

(3) d = 100 and n = 1000 using a simulated coin with q = ¼ and ½.

Kindly please provide your opinion and suggestion thus I will be able to improve my computing skills.

(The result of the execution from program will be drawn into histogram on the PowerPoint)





  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Question • Score: 0 • Views: 288 • Replies: 0
No top replies

 
 

Related Topics

 
  1. Forums
  2. » How to perform Matlab for the biased coin toss simulation
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 05/05/2024 at 06:42:43