# In Class Activity

Worked with: Tameem, Kai, and Rcardenas

## Matlab code

For determining probability that the given data was from either a normal distribution or a Student distribution.

data=load('Events20130204.txt','ascii');
mu=mean(data);
sig=std(data);

n_pdf=normpdf(data,mu,sig);
prob_norm=(sum(log(n_pdf)));

t_mu=2;
t_sig=1.2;
t_nu=5;
zscore_data=(data-t_mu)/t_sig;
t_pdf=1/t_sig*tpdf(zscore_data,t_nu);
prob_t=(sum(log(t_pdf)));

ratio=prob_norm/prob_t;


## Results

* Probability the data was drawn from a normal distribution ($\mu=2.2368$, $\sigma=2.2364$): $e^{-2223.3}$

* Probability that the data was drawn from a Student's distribution ($\mu=2$, $\sigma=1.2$, $\nu=5$): $e^{-2208.2}$

* Ratio of probability that the data is from a student distribution to that it was drawn from a normal distribution: 1.0069