-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcumulative_exercise.Rmd
32 lines (21 loc) · 1.61 KB
/
cumulative_exercise.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
title: "Statistical field work -- capture a wild distribution!"
author:
- name: Andrew MacDonald
output:
distill::distill_article:
toc: true
toc_float: true
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
**Step 1.** Think of a way you can collect some numbers. These should be numbers that can collect yourself -- no simulation, and no data from the internet! Things like the weights of shoes in your house, people on a train car, time between shots on goal in a hockey game. Choose something you like, and which you can measure in a relatively brief period of time.
**Step 2.** Think about the kind of statistical distribution that might represent this phenomenon! Write it down. Why does this distribution seem to match your data? is it constrained in some way?
**Step 3.** Collect some observations -- aim for a good number, at least 15 or so.
**Step 4.** Type in these data and visualize them. Do they match your hypothesized distribution? How do you know?
### Part 2
## Statistical field work -- exploring your dataset
**Step 1.** Return to your hypothesized distribution. Find its random number generation function (e.g. `rbinom()` for the Binomial Distribution). Experiment with different parameters values to create data that looks close to your own data.
**Step 2.** Attempt to fit the same parameters by Maximum likelihood. If you distribution has two parameters, fix one and find the Maximum Likelihood value of the other. **Stretch goal** Try to fit both of them at once.
**Step 3.** Look at the help for `?MASS::fitdistr()`. Try to use it to find your distribution parameters.