# 報告架構

1. 緒論
• 背景
• 問題/動機
• 結果簡述
2. 結果
• 資料介紹
• Exploratory Data Analysis/ Analysis
• Code
• Results/What we have found
3. 結論與討論
• Results recap
• Discussion (Limitation and future studies)

# Game 12: Shiny: Web app framework for R

Shiny

More Demo: ShinyEd

Shinyize our R codes in our previous games

• Law of Large Numbers (one distribution, one of many distributions)
• Central Limit Theorem (one distribution, one of many distributions)

References

# Final Project

## Possible Topics

• Data and Story:  Use data summary, plots or data analysis methods you’ve learned in this course or elsewhere analyze a data set to answer some questions or tell a story. You may use the datasets available at R package datasets, Data: R packages. Of course, you can also use other data sets you get from the web.
• Simulations of theorems or results in probability or statistics: We have done simulations for Law of Large Numbers, Central Limit Theorem. You may construct simulations for other theorems or results of interest to you or your fellow classmates. For example, secretary problem, gambler’s ruin problem, St. Petersberg paradox, Monty Hall problem, just to name a few.
• Shiny R or R presentation. We will see some examples in class.

Discuss/Check Date: 6/5, 6/7 and 6/14 (若時間需要)。

Upload/Email Submission: (Tentative) Project title/data submission: by 5/31.  Project submission: by AM 11:59 6/4. Submission: You can email your project link to me or pull a request at Final Project Github page.

# Game 11: Simulation-I

## Central Limit Theorem

Let $X_1, \cdots, X_n \sim$ with common mean and variance $E(X_i) = \mu, Var(X_i) = \sigma^2$ for all $i.$ Then for all $t$

$P( \frac{\bar{X}-\mu}{\sigma \sqrt{n}} \leq t ) \rightarrow \Phi(t)$

as $n \righarrow \infty$

where $\bar{X} = \frac{1}{n} \sum_{i=1}^n X_i$ and $\Phi(t)=P(Z \leq t)$ and $Z \sim N(0,1).$

R Notebook for Game 11

# Discussion

## 怎樣是一個好的（科學/資料分析）報告？

• 有關、正確，有備，有料，有梗，有效（傳達）

# Game 10: A closer look at $\bar{X}$

In this game, we will get a better understanding of $\bar{X}$ via simulation. Two important results are: Law of Large Numbers and Central Limit Theorem

# Game 9: Work on Stat 16/17 data

## Walk Prog before you run. Think before you prog.

R Notebook for Game 9 (rev)

Rev note: Some minor modifications and test/experiments done in class are added.