Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

MATLAB code to Geometric Random Variable

  1. Oct 19, 2010 #1
    1. The problem statement, all variables and given/known data

    Generate Geometric RV with Porbabilty of succcess 0.1 using only rand()

    2. Relevant equations

    geometric rv P=(1-p)^(k-1) * p where p=0.1, k is number of trial in which we get 1st success

    3. The attempt at a solution

  2. jcsd
  3. Oct 19, 2010 #2


    User Avatar

    Staff: Mentor

    Can you explain your attempt at a solution?
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook