---
title: "03 Worksheet. Crash Course in Statistics (Summer 2025)"
subtitle: "Neuroscience Center Zurich, University of Zurich"
author: "Zofia Baranczuk"
date: "2025-08-25"
output: pdf_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

## 1. Example IQ
IQ scores are designed to follow a normal distribution with a mean of 100 and a standard deviation of 15. Using this, compute the following. For each of these points, add a corresponding plot. (It doesn't have to be aesthetically pleasing, but it should help you get the intuition.)
a) P(IQ < 100)
b) P(IQ = 100)
c) P(IQ > 130)
d) P(95 < IQ < 120)
e) P(IQ < X) = 0.8. Compute X
f) P(|IQ-100| > X) = 0.2. Compute X

```{r}

```

## Q-Q plots. 
For large enough sample size, we can approximate binomial distribution using the normal distribution. For different values of size, sample from a binomial distribution and plot a q-q plot for the sampled values.

```{r}


```

## Exponential distribution
 Let X1,...,Xn be independent and identically distributed (iid) random variables following Exp(lambda). Assume lambda = 1.
a) Sample n = 100 random numbers from Exp(lambda).
Visualize the data with a histogram and superimpose the theoretical density.

```{r}

```

b) Repeat the experiment 500 times. For each replication, 
record Y=min(X1, X2, ..., Xn). Plot a histogram of the 500 values of Y. What distribution do you expect for Y, and what is its parameter value? Superimpose the theoretical density on the histogram to check. 

```{r}


```