b:head_first_statistics:using_discrete_probability_distributions
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
b:head_first_statistics:using_discrete_probability_distributions [2023/10/02 06:04] – [e.gs in R] hkimscil | b:head_first_statistics:using_discrete_probability_distributions [2023/10/04 10:29] (current) – old revision restored (2023/10/04 10:18) hkimscil | ||
---|---|---|---|
Line 616: | Line 616: | ||
\begin{align*} | \begin{align*} | ||
& E[(X + Y)^2] = E[X^2 + 2XY + Y^2] = E[X^2] + 2E[XY] + E[Y^2] \\ | & E[(X + Y)^2] = E[X^2 + 2XY + Y^2] = E[X^2] + 2E[XY] + E[Y^2] \\ | ||
- | - & [E(X + Y)]^2 = [E(X) + E(Y)]^2 = E(X)^2 + 2E(X)E(Y) + E(Y^2) \\ | + | - & [E(X + Y)]^2 = [E(X) + E(Y)]^2 = E(X)^2 + 2E(X)E(Y) + E(Y)^2 \\ |
\end{align*} | \end{align*} | ||
Line 624: | Line 624: | ||
Var[(X+Y)] = | Var[(X+Y)] = | ||
& E[X^2] & + & 2E[XY] & + & E[Y^2] \\ | & E[X^2] & + & 2E[XY] & + & E[Y^2] \\ | ||
- | - & E(X)^2 & - & 2E(X)E(Y) & - & E(Y^2) \\ | + | - & E(X)^2 & - & 2E(X)E(Y) & - & E(Y)^2 \\ |
& Var[X] & + & 2 E[XY]-2E(X)E(Y) & + & Var[Y] \\ | & Var[X] & + & 2 E[XY]-2E(X)E(Y) & + & Var[Y] \\ | ||
\end{align*} | \end{align*} | ||
Line 695: | Line 695: | ||
# variance theorem 4-1, 4-2 | # variance theorem 4-1, 4-2 | ||
# http:// | # http:// | ||
+ | # need a function, rnorm2 | ||
+ | rnorm2 <- function(n, | ||
+ | |||
m <- 0 | m <- 0 | ||
v <- 1 | v <- 1 | ||
Line 740: | Line 743: | ||
# var(x1+x2) == var(x1) + var(x2) | # var(x1+x2) == var(x1) + var(x2) | ||
######################################## | ######################################## | ||
+ | |||
## 그리고 동일한 (독립적이지 않은) 집합 X1에 대해서는 | ## 그리고 동일한 (독립적이지 않은) 집합 X1에 대해서는 | ||
v.11 <- var(x1 + x1) | v.11 <- var(x1 + x1) | ||
# var(2*x1) = 2^2 var(X1) | # var(2*x1) = 2^2 var(X1) | ||
v.11 | v.11 | ||
+ | |||
</ | </ | ||
b/head_first_statistics/using_discrete_probability_distributions.1696194275.txt.gz · Last modified: 2023/10/02 06:04 by hkimscil