Uniform distribution 
/////////////////////////////////
   Uniform distribution is the distribution evenly within a range. 

   Uniform probability distributions arise when every outcome in the 
          sample space has the same probability. 
                            
   Examples: toss a dice

/////////////////////////////////

Using rand() function to estimate pi 
/////////////////////////////////
 Methodology (logic):

  1) Let's draw a square first, assume that the size is d. 
           we know that the area will be 

                      S(square)= d * d

  2) Let's draw a circle inside the square
           We know that the area of the circle will be 
 
                  S(circle) = pi * r^2

                         where d=2r

                  S(square) = d * d =(2r)* (2r) = 4 *r^2

  3) S(circle)/ S(square) = pi *r^2 / (4*r^2) = pi/4

           pi = 4 * s(circle) /s(square)
  Procedure: 
     Step 1: we generate a pair of random number between 0 and 1. 
                  let call them x1 and y1
     Step 2: if x1^2 + y1^2 <= 1 then n1=n1+1
     Step 3: repeat this 500 times
     Step 4: the value of pi 
                    pi=n1/n
/////////////////////////////////

why generate the same random numbers, concept of seed
/////////////////////////////////
It seems a condition that people want to generate the same 
   random numbers. 

 However, many times we need to have the same ransom numbers. 
  1) An instructor wants to show how to calculate the mean and standard deviation of 10 
     random numbers drawn from a uniform distribution.

     If all students have the same 10 values, it is less problematic. 

  2) If we design a complex experiment. It is a good idea to fix our input 
      variables to have the same intermediate values. Otherwise, we would not 
      know the difference is caused by our next step or by our input values.     

Concept of seed
---------------
When choose the same seed, different users would get the same 
     set of random numbers. 

   >set.seed(12345)

/////////////////////////////////