Results 1 to 2 of 2

Math Help - Matlab Help needed

  1. #1
    Newbie
    Joined
    Sep 2008
    Posts
    24

    Cool Matlab Help needed

    I have to white a code which simulates a game.

    The game is:
    We have 2 oponents whith whom you alternate play. Whenever you play with A you win with probability pa; whenever you play with B you win with probability pb, where pb>pa.
    Your objective is to minimize the number of games you need to play to win 2 games in a row. Should you start with A or B?

    I can use some random numbers for pa and pb.
    My question is how to simulate a game.
    What should I sum or derive in Matlab code?

    Thank you!
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by bamby View Post
    I have to white a code which simulates a game.

    The game is:
    We have 2 oponents whith whom you alternate play. Whenever you play with A you win with probability pa; whenever you play with B you win with probability pb, where pb>pa.
    Your objective is to minimize the number of games you need to play to win 2 games in a row. Should you start with A or B?

    I can use some random numbers for pa and pb.
    My question is how to simulate a game.
    What should I sum or derive in Matlab code?

    Thank you!
    The core of the program is a loop that loops over games using a random number to determine the result and stopping when you win two in a row and returning the number of games simulated.

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Some help in matlab needed please
    Posted in the Math Software Forum
    Replies: 1
    Last Post: February 5th 2010, 11:01 AM
  2. More matlab help needed please
    Posted in the Math Software Forum
    Replies: 1
    Last Post: February 4th 2010, 07:33 AM
  3. Help needed to perform bootstrap with matlab
    Posted in the Math Software Forum
    Replies: 5
    Last Post: March 6th 2009, 04:22 AM
  4. Matlab-help needed
    Posted in the Math Software Forum
    Replies: 2
    Last Post: December 20th 2008, 01:39 PM
  5. MATLAB - matrice help needed
    Posted in the Math Software Forum
    Replies: 1
    Last Post: May 11th 2008, 06:01 AM

Search Tags


/mathhelpforum @mathhelpforum