---
title: "Homework 1, CROPS 545, Spring 2020"
author: "Your Name"
date: "February 3, 2020"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

## Professor: Zhiwu Zhang
## **Due on February 3, 2020, Monday 3:10 PM, PST**

Objectives: 
1. Define a novel complex distribution that is a combination of common defined distributions
2. Randomly sample from this novel distribution
3. Generate common statistical plots to describe the distribution
4. Generate percentile tables
5. Connect this complex distribution to the real world (Extra Credit)
6. Use a loop to replicate the sampling process (Extra Credit)

Grading Criteria:
* Problem is adequately addressed/answered
* All code should be bug-free and well documented
* Plots should be properly labeled
* Written portions should be in sentence form and easy to read

### **Problem 1 (20 Pts)**

Define a random variable that is a function of multiple random variables with known distributions such as uniform, binomial, Poisson, normal, Chi square, F, or t distributions. Name the distribution of your new random variable as your last name and develop an R function to generate the random variables. The input of your R function should include n, which is number variables to be generated, and parameters for the distribution you defined. Your distribution should be different from the listed known distributions (20 points).

```{r problem1}
# Your code goes here
```

### **Problem 2 (20 Pts)**

Sample ten thousand observations from the distribution you defined. Make scatter, histogram, density and accumulative density plots (20 points).

```{r problem2}
# Your code goes here
```

### **Problem 3 (20 Pts)**

Create tables for your variable at different percentiles (1%, 5%, 10%, 50%, 90%, 95% and 99%), and describe the impact of the parameters of your distribution (20 points).

```{r problem3}
# Your code goes here
```

### **Problem 4 (20 Pts)**

Generate one or multiple samples with sizes of your choices from the distribution you defined, and define a statistics from your samples.

```{r problem4}
# Your code goes here
```

### **Problem 5 (20 Pts)**

Create ten thousand replicates of your statistics and make the same plots as in problem 2.

```{r problem5}
# Your code goes here
```

### **Problem 6 (Extra Credit 20 Pts)**

In 250 words or less, create a real world narrative that makes sense out of your distribution. (Example should be )

### **Problem 7 (Extra credit 20 Pts)**

In 250 words or less, give an example that makes sense out of your statistics if it has a distribution that is not in the known distribution list.




