Final project: Random variables


Investigating other random variables

Performing the exercises in the apply and extend parts of this project will teach you how to generate uniform, bernoulli, binomial, poisson, geometric, exponential and normal random variables. You will learn how to derive expressions for the expectations and variances of these different types of random variables from the random variables parameters. Furthermore, you will learn about the law of large numbers and how we can estimate expectations and probability distribution functions by repeatedly generating random variables from a particular distribution. Some suggestions as to how to take your research in these ideas a little further are given below. You may also want to discuss what you plan to research further with your lecturer.
  • As part of your project on random variables you wrote a program to estimate the probability mass/density function for a particular random variable that worked by generating a large number of identically distributed random variables. Now write a program to estimate the cumulative probability distribution function for the same kind of random variable you wrote your project on.
  • Suppose that $X$ is a geometric random variable with $p=0.5$. Now suppose that we generate a random variable $Z$ that is a function of $X$ using $Z = 2^X$. Write a python notebook that generates multiple instances of this random variable $\{ Z_i \}$. Draw a graph that shows how the sample mean, $\mu_n = \frac{1}{N} \sum_{i=1}^n Z_i$, changes as the number of variables it is calculated from increases. Discuss the behaviour of this sample mean and compare it to the behaviour that you observed for the other random variables you have investigated. Derive an expression for the expression for the expectation of this random variable and use this expression to explain why the sample mean for this random variable behaves in the way you observe.
  • Write a program that generates random variables from a Cauchy distribution. Generate a large number of identically distributed Cauchy random variables and use this data to estimate the probability density function for your random variable.
  • Discuss how Student's-t-distribution arises from sampling and how this distribution differs from the standard normal distribution. You should write a program that generates random variable from Student's-t-distribution and make sure that you plot the a graph of showing how the shape of the $t$ distribution changes as the number of degrees of freedom is increased.

Contact Details

School of Mathematics and Physics,
Queen's University Belfast,
Belfast,
BT7 1NN

Email: g.tribello@qub.ac.uk
Website: mywebsite