text:
# RC oscillator amplitude?

I'm trying to make this sine wave oscillator, but I want the amplitude of the voltage sine wave to be 4.8V and the output current amplitude to be 45A. I am not sure how to go about calculating for the amplitude for either the current or the voltage. Has anyone had some experience with these?

• What frequency should be achieved with this? Why do you need such a high peak current? – Grebu Dec 28 '16 at 10:33
• Hum, do you really mean 45 ampere? – pipe Mar 29 '17 at 10:05
• @meagh: If you specify the output voltage (BTW it's not clear if you mean $V_{pp}$ or $V_{max}$ or $V_{RMS}$ or...) the output current is given by your load resistance (Ohm's law) not by other parameters of the oscillator. ...and as pipe noted 45A is quite a high current; did you mean mA? – Curd Mar 29 '17 at 10:49

You are really asking two quite separate questions: 1) how do I make a 4.8 volt phase-shift oscillator (and I notice that you do not specify pk-pk, rms, or mean amplitude), and 2) how do I drive a 0.1 ohm load at this voltage?

1) The simplest way to regulate the amplitude is to make Rf slightly greater than necessary, and let the op amp saturation limit the amplitude by clipping. For this sort of circuit, having the gain slightly too high will not cause the output to develop into a square wave. Instead, it will stabilize with slightly flattened peaks. The actual amplitude will depend on power supply voltages and op amp saturation characteristics, so you'll need to do some research on that. You would follow such an amplifier with a voltage divider to give about 1 volt, which is a standard voltage level for the next stage, which is

2) Making high-current output will be a challenge. Assuming your voltage is rms, your output power will be (4.8 x 45) or a bit more than 200 watts. Your best bet might be to build a high-power audio amplifier capable of, say 300 watts, then feed a step-down transformer to lower the voltage. Assuming a nominal 8-ohm load for the amplifier, the output voltage is about 42 volts rms, so you'd need about an 8.6:1 ratio. If your signal frequency is around 60 Hz, you could use a standard power transformer designed to take 120 VAC and give 14 volts, which is a standard process control voltage. The transformer, of course, would have to be rated for more than your nominal 216 watts. If you're using a different frequency, you'd need to either design and build your own transformer, or find a source of specialty units. It's entirely possible that the audio amplifier connoisseur community might be a source of such a transformer.

On the other hand, if your frequency isn't too high, you might have a go at making an amplifier using an op amp followed by some high-current MOSFETs, although that discipline has some gotchas which you would need to learn about.

Correction: Only now I have discovered that the shown circuit is not identical with the classical phase shift topology with 3 C-R units. The most right resistor R of the C-R highpass chain must be in series to the most right capacitor - and connected directly to the inverting opamp input. (As shown, this resistor is between the differential input which - for ideal opamps - has zero voltage. Hence, R has no meaning and no influence).

However, the circuit (without the mentioned resistor R) can work - but for another dimensioning if compared with the "classical" topology. Here, the third C-R highpass block is replaced by a differentiating active block.

(A) As mentioned already by WhatRoughBeast, the value of the feedback resistor should be (no: MUST be) slightly larger than the theoretical value. This is really required because otherwise the circuit cannot start safely. Moreover, due to unavoidable tolerances you have no other chance to be on the safe side (loop gain >0 dB at the oscillation frequency).

(B) In case you want to avoid hard-limiting of the oscillation amplitude you can introduce a "soft-limiting" device. As the most simple solution you could replace the feedback resistor Rf by a parallel combination Rf=[Rf1||(Rf2+rd)]. Here, rd is the differential resistance of a diode. However, because the diode must open for both half waves (both polarities) you must use two antiparallel diodes in series to Rf2.

Now it is your task to select proper values for Rf1 and Rf2 so that an opening of the diode allows a value of the resulting Rf value which fulfills the oscillation condition for the desired output voltage.

(C) In a simplified version of this principle you could place the two diodes directly across Rf (only one resistor). However, in this case, the signal quality will be degraded (if compared with version B) because the limting action is "less soft" as in case B.

(D) An alternative solution (with diodes) can be found here: http://electronicsarea.com/wp-content/uploads/phase_shift_oscillator_amplitude_limiter.gif


text:
Display Title Math Example: Adding Fractions: Example 07

Tutorial--Adding Fractions: Example 7. In this example, two fractions with different denominators are added. The denominators are relatively prime. The sum does not need to be simplified.

format: plain


text:
# Monday, March 11, 2013 Orthogonal projections and minimisation

First class after the break. Continuing with chapter 6: orthogonal projections and minimisation problems, and an introduction to linear functionals and adjoints near the end. Midterms were handed back.

## 1Orthogonal complements¶

The orthogonal complement of a subspace $U \subseteq V$ is defined by
$$U^{\perp} = \{ v \in V : \langle u, v \rangle = 0 \, \forall u \in U \}$$
Thus it consists of all the vectors in $V$ that are orthogonal to every vector in $U$.

### 1.1Direct sum theorem¶

$$V = U \oplus U^{\perp}$$

(Where $U$ is finite-dimensional. No such restriction on $V$.)

Proof: First, we show that $V = U + U^{\perp}$: Let $(e_1, \ldots, e_n)$ be an orthonormal basis of $U$. Any $v \in V$ can be written as the following:

$$v = \underbrace{\langle v, e \rangle e_1 + \ldots + \langle v, e_n\rangle e_n}_{\in U} + \underbrace{v - (\langle v, e \rangle e_1 + \ldots + \langle v, e_n\rangle e_n)}_{\in U^{\perp}}$$

The first component is clearly in $U$ since it's just a linear combination of some basis vectors of $U$. To show that the second component is in $U^{\perp}$, we call it $w$. Then $\langle w, e_j \rangle = \langle v, e_j \rangle - \langle v, e_j \rangle = 0$ for each $j$ (the rest of the terms are zero as well because all of the basis vectors are pairwise orthogonal. Thus $w$ is orthogonal to any vector in the span of the orthonormal basis, which is to say, any vector in $U$. Thus $w \in U^{\perp}$.

Next, we need to show that $U \cap U^{\perp} = \{0\}$. Let $v$ be in their intersection. Then, since $v \in U^{\perp}$, it must be perpendicular to every vector in $U$, including $v$ itself. Thus $\langle v, v\rangle = 0$. By positive definiteness, we know that $v = 0$. $\blacksquare$

#### 1.1.1Corollary¶

Any vector in $V$ can be written as the sum of $u \in U$ and $w \in U^{\perp}$. Proof: follows trivially from the theorem above.

### 1.2Orthogonal projections¶

We define an orthogonal projection, $P_u$, as follows:

\begin{align} P_u: V & \to U \\ v & \mapsto u \end{align}

where $u$ is the component in $U$ (see previous section). Thus we send any vector to the part of its decomposition that is in $U$. If $(e_1, \ldots, e_n)$ is an orthonormal basis for $U$, then $P_uv = \langle v, e_1\rangle e_1 + \ldots + \langle v, e_n \rangle e_n$.

#### 1.2.1Proposition 6.36¶

Let $U$ be a subspace of $V$, and let $v \in V$ be fixed. Then, the distance between $v$ and $P_uv$ follows the following inequality:

$$\lVert v - P_uv \rVert \leq \lVert v- u \rVert$$

for any $u \in U$. So $P_uv$ is closest to $v$ among all vectors $u \in U$. Equality holds only when $u = P_uv$.

Proof: Let $u \in U$. Then:

\begin{align} \lVert v- u \rVert^2 & = \lVert v- P_uv + P_uv - u \rVert^2 \\ & \geq \lVert v- P_uv \rVert^2 + \underbrace{\lVert P_uv -u\rVert^2}_{\geq 0} \tag{by the triangle inequality} \\ & \geq \lVert v - P_uv \rVert^2 \tag{since the other component \geq 0} \end{align}

Then, if we take the square root of both sides, we get $\lVert v - u\rVert \geq \lVert v - P_uv\rVert$, as desired. When equality holds is given by the triangle inequality. $\blacksquare$

#### 1.2.2Exercise¶

Find a polynomial $u \in P_2(\mathbb R)$ that approximates $\sin(x)$ on the interval $[-\pi, \pi]$. That is, we want to minimise

$$\int_{-\pi}^{\pi} |\sin(x) - u(x)|^2\,dx$$

Formulated in terms of a minimisation problem, the vector space $V$ is the set of all continuous functions from $-\pi$ to $\pi$, and $U = P_2(\mathbb R)$. We know that $P_uv$ is the minimum (where $v(x) = \sin(x)$), so we just need to find that. We can do this by finding an orthonormal basis of $P_2(\mathbb R)$ and then applying the projection.

To find the orthonormal basis, we use Gram-Schmidt. Recall that the standard basis is $\{1, x, x^2\}$.=, where $v_1 = 1$, $v_2 = x$, $v_3 = x^2$. Note that $\lVert v_1 \rVert = 1$ since it's just the integral of 1 from 0 to 1. Then:

\begin{align} e_1 & = \frac{v_1}{\lVert v_1 \rVert} = v_1 = 1 \\ e_2 & = \frac{v_2 - \langle v_2, e_1 \rangle e_1}{\lVert v_2 - \langle v_2, e_1 \rangle e_1 \rVert} = \frac{x - \int_0^1 x \,dx}{\lVert x - \int_0^1 x \,dx \rVert} = \frac{x - \frac{1}{2}}{\sqrt{\int_0^1 (x - \frac{1}{2})^2\,dx} } = \frac{x-\frac{1}{2}}{\sqrt{\frac{1}{12}}} = \sqrt{12}x - \sqrt{3} \\ e_3 & = x^2 -x + \frac{1}{6} \tag{skipping the derivation because it's tedious to type, but the answer is right don't worry} \end{align}

Then $P_uv = \langle v, e_1 \rangle e_1 + \langle v, e_2 \rangle e_2 + \langle v, e_3 \rangle e_3$. The conclusion of this is left as an exercise for the reader because I don't want to have to compute all those integrals.

## 2Linear functionals and adjoints¶

A linear functional is a linear map from $V$ to $\mathbb F$. An example: $\varphi: \mathbb F^3 \to \mathbb F$ which sends $(z_1, z_2, z_3)$ to $z_1-z_2 + 7z_3$. Or, more generally, $\varphi : V \to \mathbb F$ which sends $u$ to $\langle u, v \rangle$ where $v$ is some fixed vector in $V$. (The first example is just a special case of the last one, where $v = (1, -1, 7)$.)

We'll continue this next class.


text:
# If 75% of radioactive material remains, how many half-lives have elapsed?

Radioactive element A radioactively decays into material B. If 75% of A and 25% of B are present, how many half-lives of material A have elapsed?

I was recently taught that the correct answer is "one half of a half-life has elapsed". However, due to the fact that the amount of radioactive material remaining scales exponentially (logarithmically) instead of in a linear fashion, wouldn't the answer be less than one half of a half-life?

-
It doesn't scale quadratically, but rather exponentially (logarithmically). –  gerrit May 8 at 15:30
"I was taught that the correct answer is..." - you were taught badly (and you realize it which is good). Not only was the given answer wrong - the question was poorly phrased. In most instances element B would not be stable - and the only information you need is what percentage of A remains. Then again, determination of age often relies on ratios of isotopes present - but do realize you need to know the half life of the entire chain, not just the parent, in order to do the math correctly. –  Floris May 10 at 22:13
This is a math question. –  Paul May 12 at 21:47

@gerrit provided a formula, but without stating the reasoning behind it.

Radioactive decay is an exponential, not quadratic, function. After $n$ half-lives, the amount of the original material remaining is

$$\textrm{amount remaining after}\ n\ \textrm{half-lives} = \left(\frac{1}{2}\right)^n$$

Therefore, you want to solve

\begin{align*} \left(\frac{1}{2}\right)^n &= \frac{3}{4}\\ \log_\frac{1}{2} \left(\frac{1}{2}\right)^n &= \log_\frac{1}{2} \frac{3}{4}\\ n &= \frac{\log \frac{3}{4}}{\log \frac{1}{2}} = \frac{\log \frac{3}{4}}{- \log 2} \approx 0.415 \end{align*}

-

You can use simple logarithms to calculate the answer. The number of half-lives that have elapsed can be calculated with

$$- \frac{\log{f}}{\log{2}}$$

where $f$ is the fraction that remains.

So plugging in the numbers gives

$$- \frac{\log(0.75)}{\log(2)} = 0.415 = 41.5\%$$

-

The other answers are entirely correct. But I like graphical representations.

From http://en.wikipedia.org/wiki/Radioactive_decay we see the decay formula is:

$$N(t) = N_0e^\frac{-t}{τ}$$

Where N0 is the starting number of nuclides and τ is the mean lifetime. We also see that the half-life is

$$t_{1/2} = τ ln(2)$$

Substituting for τ, we get:

$$N(t) = N_0e^\frac{-tln(2)}{t_{1/2}}$$

So for example if we have N0 = 1000 and t1/2 = 100 we can plot the following graph:

Note that the horizontal axis is the t-axis.

We see the following:

• At t=100 (one half life), N(t) is 500, half of 1000, as expected
• At t=200 (two half lives), N(t) is 250, 1/4 of 1000, as expected
• We intersect the curve with a line at N(t) = 750. Here we can see this occurs at about t=41.5 as predicted by the other answers.
-
Here we can see this occurs at about t=41.5 as predicted by the other answers. If you can see, that is. This site is overly-reliant on imagery. Good answers should be accessible to those who can't see / can't see very well. –  David Hammen May 10 at 0:50


text:
# Differential Equations¶

[1]:

import brainpy as bp

In BrainPy, the difinition of differential equations is supportted by a powerfull decorator @bp.integrate. Users should only explicitly write out the right hand of the differential equations, and BrainPy will automatically integerates your defined differential equations.

BrainPy supports the numerical integration of ordinary differential equations (ODEs) and stochastic differential equations (SDEs).

## ODEs¶

For an ordinary differential equation

$\frac{dx}{dt} = f(x, t)$

the coding in BrainPy has a general form of:

@bp.integrate
def func(x, t, other_arguments):
# ... do some computation
f = ...
return f

x_t_plus = func(x_t, t, other_arguments)

## SDEs¶

For the stochastic differential equation:

$\frac{dx}{dt} = f(x, t) + g(x, t) dW$

the coding in BrainPy can be conducted as:

@bp.integrate
def func(x, t, other_arguments):
# ... do some computation
f = ...
g = ...
return f, g

x_t_plus = func(x_t, t, other_arguments)

## Return intermediate values¶

BrainPy also supports the user return the intermediate computed results. Let’s take the differential equation of $$V$$ in Hodgkin–Huxley (HH) neuron model as an example. In HH model, the stochastic differential equation $$V$$ is expressed as:

\begin{align} C_{m}{\frac {d V}{dt}}&=-{\bar {g}}_{K}n^{4}(V-V_{K}) - {\bar {g}}_{Na}m^{3}h(V-V_{Na}) -{\bar {g}}_{l}(V-V_{l}) + I^{ext} + I^{noise} * dW, \end{align}

where

• the potassium channel current is $$I_{K} = {\bar {g}}_{K}n^{4}(V-V_{K})$$,

• the sodium channel current is $$I_{Na} = {\bar {g}}_{Na}m^{3}h(V-V_{Na})$$, and

• the leaky current is $$I_{L} = {\bar {g}}_{l}(V-V_{l})$$.

The user may not only has the interest of the final value $$V$$, but also take care of the intermediate value $$I_{Na}$$, $$I_K$$ and $$I_L$$. In BrainPy, this kind of requirement can be coded as:

@bp.integrate
def func(V, t, m, h, n, Iext):
INa = gNa * m ** 3 * h * (V - ENa)
IK = gK * n ** 4 * (V - EK)
IL = gLeak * (V - ELeak)
f = (- INa - IK - IL + Isyn) / C
g = noise / C
return (f, g), INa, IK, IL

V_t_plus, INa, IK, IL = func(V_t, t, m, h, n, Iext)

Generally, return intermediate values in ODE function can be coded as:

@bp.integrate
def func(x, t, other_arguments):
# ... do some computation
f = ...
return (f, ), some_values

Return intermediate values in SDE function can be coded as:

@bp.integrate
def func(x, t, other_arguments):
# ... do some computation
f = ...
g = ...
return (f, g), some_values


text:
If you find any mistakes, please make a comment! Thank you.

## Compute the order of a cyclic subgroup in Z/(54)

Solution to Abstract Algebra by Dummit & Foote 3rd edition Chapter 2.3 Exercise 2.3.10

What is the order of $\overline{30}$ in $\mathbb{Z}/(54)$? Write out all of the elements and their orders in $\langle \overline{30} \rangle$.

Solution: We know that $$|\overline{30}| = 54/\mathsf{gcd}(30,54) = 54/6 = 9.$$ The elements of $\langle \overline{30} \rangle$ are $$\{ \overline{30}, \overline{6}, \overline{36}, \overline{12}, \overline{42}, \overline{18}, \overline{48}, \overline{24}, \overline{0} \}.$$ The order of each element in $\langle \overline{30} \rangle$ is the same as its order in $\mathbb{Z}/(54)$. Thus we have the following. $$|\overline{30}| = 9$$ $$|\overline{6}| = 54/\mathsf{gcd}(6,54) = 54/6 = 9$$ $$|\overline{36}| = 54/\mathsf{gcd}(36,54) = 54/18 = 3$$ $$|\overline{12}| = 54/\mathsf{gcd}(12,54) = 54/6 = 9$$ $$|\overline{42}| = 54/\mathsf{gcd}(42,54) = 54/6 = 9$$ $$|\overline{18}| = 54/\mathsf{gcd}(18,54) = 54/18 = 3$$ $$|\overline{48}| = 54/\mathsf{gcd}(48,54) = 54/6 = 9$$ $$|\overline{24}| = 54/\mathsf{gcd}(24,54) = 54/6 = 9$$ $$|\overline{0}| = 1$$


text:
# Arbitrary Ring and Field Contruction

Does anybody know if there has been any study in the construction of rings and/or fields out of groups, particularly with respect to certain operations? For example, the set of the reals and operation $a \cdot b := a + b - 1$ forms a commutative group, but how would one find a second operation that would create a field or ring? If it exist, could you construct it out of addition, multiplication and their inverses? How would you approach problems like these in general?

• In your specific example, $a*b:=(a-1)(b-1)$ works as multiplication to your addition "$\cdot$" :) – Hagen von Eitzen Jun 29 '18 at 6:41

In general when you have a structure $M$ (in some language L; in this case L is the language or ring and the L-structure is $\mathbb{R}$) and a set $S$ such that there exists a bijective map $f:M\to S$ then you can pass the structure of $M$ to the set $S$ and you get a new $L$-structure. In the case of the Rings you can define:

$+^\sim : S\times S\to S$ such that for every $(a,b)\in S\times S$ $a+^\sim b:=f(f^{-1}(a)+f^{-1}(b))$

$\cdot^\sim : S\times S\to S$ such that for every $(a,b)\in S\times S$ $a\cdot^\sim b:=f(f^{-1}(a)f^{-1}(b))$

So you can prove that $(S,+^\sim, \cdot^\sim, f(0), f(1))$ is Ring (with unity if $M$ is a ring with unity).

Now we can define a trivial bijective map to $f:\mathbb{R}\to \mathbb{R}$ , the function that maps every $a\in \mathbb{R}$ to $f(a):=a+1$

In this case $\mathbb{R}$ is a new Ring with unity with the new operations:

$+^\sim : \mathbb{R} \times \mathbb{R}\to \mathbb{R}$ such that for every $(a,b)\in \mathbb{R}\times \mathbb{R}$ $a+^\sim b:=f(f^{-1}(a)+f^{-1}(b))=$

$f((a-1)+(b-1))=f((a+b)-2)=a+b-1$

$\cdot^\sim : \mathbb{R}\times \mathbb{R}\to \mathbb{R}$ such that for every $(a,b)\in \mathbb{R}\times \mathbb{R}$ $a\cdot^\sim b:=$

$f(f^{-1}(a)f^{-1}(b))=f((a-1)(b-1))=$

$f(ab-(a+b)+1)=ab-(a+b)+2$

You can observe that $f(0)=1$ so the neutral element is changed with the neutral element with the product (but $f(1)=2$ so 0 it is not the new neutral element with respect to the new product)

You can find a bijective map that map $f(0)=1$ and $f(1)=0$ in general for Rings.

What is this map?


text:
# Prove $\sum\limits_{\mathrm{cyc}}\sqrt{a^2+bc}\leq{3\over2}(a+b+c)$ with $a,b,c$ are nonnegative

Hope someone can help on this inequality using nonanalytical method (i.e. simple elementary method leveraging basic inequalities are prefered).

Prove $\sum\limits_{\mathrm{cyc}}\sqrt{a^2+bc}\leq{3\over2}(a+b+c)$ with $a,b,c$ are nonnegative.

Here is what I already got.

First of all, one should notice equality holds not when $a=b=c$ as one might initially thought. Rather, the equality holds when $(a,b,c)$ is a permutation of $({1\over2},{1\over2},0)$.

Secondly and obviously, this is cyclical and homgeneous and hence we can apply the EMV theorem developed by a IMO golden medalist (reference here: http://www.artofproblemsolving.com/Forum/viewtopic.php?p=1130901) and then the original inequality can be easily proved by assuming $$f(a,b,c)={\sum\limits_{\mathrm{cyc}}\sqrt{a^2+bc}\over {a+b+c}},$$and then prove $$f(1,1,1)\leq{3\over2},\\f(a,b,0)\leq{3\over2},\forall a,b\geq0.$$

But this kind of proof does not fit my appetite as it not only involves some additional theorem but also not very nice as the simple nice form of the question of itself.

So can people help on some elementary proof that might only taking use of the basic inequalities like AM-GM, Jensen's inequality, etc.

first we check $abc=0$,if $a=0 ,\implies 2\sqrt{bc}\le b+c$,it is true.the "=" will hold when $b=c$

in case $abc \not=0$

let $c=Max${$a,b,c$},

we discuss two cases:

1. $a^2+b^2+c^2 \ge 2(ab+bc+ac) \implies c\ge a+b+2\sqrt{ab} \implies ab \le \dfrac{c^2}{16}$

LHS $\le\sqrt{a^2+bc}+\sqrt{b^2+ac}+\sqrt{c^2+\dfrac{c^2}{16}}\iff \sqrt{a^2+bc}+\sqrt{b^2+ac}+\dfrac{\sqrt{17}c}{4} \le \dfrac{3(a+b+c)}{2} \iff\sqrt{a^2+bc}+\sqrt{b^2+ac} \le \dfrac{3(a+b)+(3-\dfrac{\sqrt{17}}{2})c}{2} \iff 2 \sqrt{a^2+bc}\sqrt{b^2+ac}\le p^2c^2+q(a+b)c+5a^2+5b^2+18ab \\ p=3-\dfrac{\sqrt{17}}{2}>0.8,q=14-3\sqrt{17}>1\\ \iff 4a^2b^2+4b^3c+4a^3c+4abc^2 \le \left( p^2c^2+q(a+b)c+5a^2+5b^2+18ab\right)^2$

look at RHS, from$18ab$ we take $2ab$ to cover $4a^2b^2$, $16ab+p^2c^2 \implies 32p^2abc^2 >4abc^2,2*5a^2*qac >4a^3c,2*5b^2*qbc>4b^3c \implies LHS <RHS$

2 . $a^2+b^2+c^2 \le 2(ab+bc+ac)$ (that is why we exculde $abc=0$)

with $\dfrac{\sqrt{x}+\sqrt{y}+\sqrt{z}}{3} \le \sqrt{\dfrac{x+y+z}{3}}$

LHS $\le \sqrt{3(a^2+bc+b^2+ac+c^2+ab)} \iff \\ \sqrt{3(a^2+b^2+c^2+ab+bc+ac)} \le \dfrac{3(a+b+c)}{2} \iff a^2+b^2+c^2 \le 2(ab+bc+ac)$

but first "=" will be hold when$a=b=c$, second "=" will hold when $c=a+b+2\sqrt{ab}$

so it is impossible to hold "=".

QED

By C-S $$\left(\sum_{cyc}\sqrt{a^2+bc}\right)^2\leq\sum_{cyc}\frac{a^2+bc}{2a^2+b^2+c^2+bc}\sum_{cyc}(2a^2+b^2+c^2+bc).$$ Thus, it remains to prove that $$\sum_{cyc}\frac{a^2+bc}{2a^2+b^2+c^2+bc}\sum_{cyc}(4a^2+bc)\leq\frac{9(a+b+c)^2}{4}$$ or $$\sum_{cyc}(2a^8+2a^7b+2a^5c+9a^6b^2+9a^6c^2-23a^5b^3-23a^5c^3+20a^4b^4+11a^6bc+$$ $$+70a^5b^2c+70a^5c^2b+79a^4b^3c+79a^4c^3b+263a^4b^2c^2-195a^3b^3c^2)\geq0,$$ which is obvious.

Done!

• Why this is obvious? Assume a=c=1, then expression = $20b^4 -159b^3+...$ may not be always greater than zero? – Wangwang Oct 1 '17 at 3:05

Proof.

(i) if abc=0, W.L.O.G assume c=0, $\Longleftrightarrow a+b \geq 2\sqrt{ab}$, it is clearly true.

(ii) in the following, assume $abc > 0$.

Case 1: $a^2+b^2+c^2 \leq 2(ab+bc+ca)$

according to Cauchy-Schwarz inequality, we have: $$LHS \leq \sqrt{3(a^2+b^2+c^2+ab+bc+ca)}$$ $$\Longleftrightarrow \sqrt{3(a^2+b^2+c^2+ab+bc+ca)} \leq {3\over2}(a+b+c)$$ $$\Longleftrightarrow 3(a^2+b^2+c^2+ab+bc+ca) \leq {9\over4}(a+b+c)^2$$ $$\Longleftrightarrow a^2+b^2+c^2 \leq 2(ab+bc+ca)$$

it is clearly true.

Case 2: $a^2+b^2+c^2 \geq 2(ab+bc+ca)$

W.L.O.G. assume c=max{a,b,c}, according to Cauchy-Schwarz inequality, $$\sqrt{a^2+bc} + \sqrt{b^2+ac} \leq \sqrt{2(a^2+b^2+ac+bc)}$$

and $$\sqrt{c^2+ab}=\sqrt{c^2+ab}-c+c=\frac{ab}{\sqrt{c^2+ab}+c} +c \leq \frac{ab}{2c} +c$$

$LHS \leq \sqrt{2(a^2+b^2+ac+bc)} + \frac{ab}{2c} +c \leq {3\over2}(a+b+c)$

$$\Longleftrightarrow \sqrt{2(a^2+b^2+ac+bc)} \leq {3\over2}(a+b+c) - c - \frac{ab}{2c}$$ $$\Longleftrightarrow \sqrt{2(a^2+b^2+ac+bc)} \leq {3\over2}(a+b) + {1\over2}c - \frac{ab}{2c}$$ $$\Longleftrightarrow 2(a^2+b^2+ac+bc) \leq ({3\over2}(a+b) + {1\over2}c - \frac{ab}{2c})^2$$ $$\Longleftrightarrow \frac{a^2b^2-6a^2bc-6ab^2c+a^2c^2+16abc^2+b^2c^2-2ac^3-2bc^3+c^4}{4c^2} \geq 0$$ $$\Longleftrightarrow \frac{a^2b^2+abc(16c-6a-6b)+c^2(a^2+b^2+c^2-2ac-2bc)}{4c^2} \geq 0$$

it is also true.


text:
Cooperative Oracles: Stratified Pareto Optima and Almost Stratified Pareto Optima post by Scott Garrabrant 507 days ago | Vadim Kosoy, Patrick LaVictoire and Stuart Armstrong like this | 8 comments In this post, we generalize the notions in Cooperative Oracles: Nonexploited Bargaining to deal with the possibility of introducing extra agents that have no control but have preferences. We further generalize this to infinitely many agents. (Part of the series started here.) Consider example 1 from the previous post: $$P_1$$ and $$P_2$$ are in a prisoners dilemma. Their utility functions are $$U_1(p,q)=2q-p$$ and $$U_2(p,q)=2p-q$$. Their fair sets are $$F_1=\{(p,q)\in R|p\leq q\}$$ and $$F_2=\{(p,q)\in R|q\leq p\}$$. We will introduce one extra player $$P_3$$ which has no options. However, he will have preferences, $$U_3=-U_1-U_2$$. Since he has no actions, his fair set must be everything. Now, since the game is zero sum, every outcome is Pareto Optimal, so using the method described in the previous post, any equilibrium in which $$p=q$$ will be valid. We will modify the framework to make this no longer the case, and make $$p=q=1$$ the only valid solution. For this, we will define a “stratified Pareto optimum.” We will still have a finite number of players $$P_1,\ldots, P_n$$. Each player will specify a subset of players they will depend on. Let $$D_i$$ be set of players that $$P_i$$ depends on. $$U_i$$ must only be a function of the actions of players in $$D_i$$, and $$F_i$$ must be closed under changing the actions of any player not in $$D_i$$. We define a preorder on the agents. We say that $$P_i\prec P_j$$ if $$P_i\in D_j$$, and we take the transitive closure, so $$P_i\prec P_k$$ whenever $$P_i\prec P_j$$ and $$P_j\prec P_k$$. We also say that $$P_i\prec P_i$$ for all $$i$$. We say that $$r^\prime$$ is a stratified Pareto improvement over $$r$$ for player $$P_i$$ if: $$U_i(r^\prime)>U_i(r)$$ $$U_j(r^\prime)\geq U_j(r)$$ for all $$P_j\prec P_i$$ $$r^\prime_k=r_k$$ $$P_i\not\prec P_k$$ We say that $$r$$ is stratified Pareto optimal in $$F\subseteq R$$ for player $$P_i$$ if there is no alternate outcome $$r^\prime\in F$$ such that $$r^\prime$$ is a stratified Pareto improvement over $$r$$ for player $$P_i$$. If $$r$$ is stratified Pareto optimal for all players, we say it is stratified Pareto optimal. Claim: The set $$F=\bigcap_{i\leq n} F_i$$ has a stratified Pareto optimum. Proof: Consider some nonempty subset of players $$S$$ with the property that for all $$P_i,P_j\in S$$, $$P_i\prec P_j$$, and there is no $$P_i\in S$$, $$P_k\not\in S$$ with $$P_k\prec P_i$$. We know that such a subset exists, since the preorder over players induces a poset over equivalence classes of players (where every player in an equivalence class transitively depends on every other player), and this poset must have a minimal element. We then take an element of $$\prod_{P_i\in S}\Delta_i$$, which is Pareto optimal for all the players in $$S$$. Note that it is important here that the players in $$S$$ have utility functions and fair sets that only depend on the other players in $$S$$. We can then lock in all the players in $$S$$ as behaving according to this local Pareto optimum. We will treat them a constants, and effectively remove from the game, and repeat the process with the remaining players. Take $$r$$ found by above process. Assume by way of contradiction that $$r^\prime$$ is a stratified Pareto improvement over $$r$$ for $$P_i$$. Consider the set of players $$P_k$$ with $$P_k\prec P_i$$. We can restrict the game to only those players, which makes sense since these players only have utility functions and fair sets that refer to each other. Thus, we may assume without loss of generality that every player $$P_k\prec P_i$$. Thus $$P_i$$ is in the set of players locked in on the last step. Notice that in this case $$r^\prime$$ being a stratified Pareto improvement is equivalent to $$r^\prime$$ being a Pareto improvement for the players locked in on the last step, while fixing all the actions that were already locked in on previous steps, which contradicts the Pareto optimality of the distributions chosen in the last step. $$\square$$ Now, we can give a new bargaining procedure, which is the same as from the previous post, except instead of choosing a Pareto optimal point in $$F$$, we choose a stratified Pareto optimal point in $$F$$. Observe that in the above 3 player game, we end up with the first two players cooperating, since they do not depend on the third player. Unfortunately, the above construction depends heavily on the fact that there only finitely many players. Indeed, if you extend the above definitions to infinitely many players in the obvious way, stratified Pareto optima need not exist: Consider a game with a player $$P_i$$ for all $$i\in\mathbb{Z}$$. Each player outputs a single probability $$r_i\in\Delta_i=[0,1]$$ of outputting $$\top$$ (as opposed to $$\bot$$). The utility function $$U_i(r)$$ is just equal to $$r_i$$, the probability that that player outputs $$\top$$. The fair set $$F_i$$ is the set of points such that either $$r_i=r_{i-1}/2$$ or $$r_{i-1}=0$$. This is a valid fair set, since we can use the strategy $$f(r)=r_i$$ if $$r_{i-1}=0$$ and $$f(r)=r_{i-1}/2$$ otherwise, which is in fact Kakutani. Observe that $$P_i\prec P_j$$ iff $$i\leq j$$. The set $$F$$, which is the intersection of all the fair sets of all the players is still closed and nonempty. (And this is still true for arbitrary games with infinitely many players) We have that $$r\in F$$ if either $$r_i=0$$ for all $$i$$ or if there is some first nonzero $$r_i$$, and all $$r_j$$ for $$j>i$$ are equal to $$r_j/2^{j-i}$$. Either way, there is some $$i$$ such that $$r_j=0$$ for all $$ji$$. We therefore need a weaker notion than stratified Pareto optimal for infinitely many players. Note that we can still get stratified Pareto optima if there are no infinite descending chains of strict dependency. (e.g. if the above example grounded out and only had positive integers) The way that we weaken stratified Pareto Optima is to take the (point wise) closure of the notion of stratified Pareto Optima for player $$P$$. We say that $$r$$ is an almost stratified Pareto Optimum (ASPO) in $$F$$ for player $$P$$ if it is in the point wise closure of the set of all stratified Pareto optima for player $$P$$. We say that $$r$$ is ASPO in $$F$$ if it is ASPO for $$P$$ for all players $$P$$. Claim: In a game with possibly infinitely many points, the set $$F$$ of fair points fair for all players is nonempty and there exists an ASPO in $$F$$. Proof: First, observe that for any finite subset of players, the set of points fair for all those players is compact and nonempty by the Kakutani fixed point theorem. By compactness, the set $$F$$ of points fair for all players is also compact and non-empty. Now, observe that for any finite subset $$S$$ of players, there exists an $$r\in F$$ which is stratified Pareto optimal in $$F$$ for each all players in $$S$$, using the argument from the finite case. Thus, the subset of $$F$$ which is ASPO for all players in $$S$$ is nonempty and compact. Again by compactness, this means that the subset of $$F$$ which is ASPO for all players is also nonempty and compact. Thus, there exists an $$r\in F$$ which is ASPO in $$F$$ for all players. $$\square$$ At first this weakening may seem unnatural. Notice that the all 0’s vector in the above example is ASPO, even though there are many Pareto improvements and stratified Pareto improvements. (Locally, it is arbitrarily close to points with all small positive probabilities that cannot be improved.) However, we think that this condition is actually pretty natural, and the most you could hope for. The point of the players having Kakutani responses and continuous utility functions was to set them up to only have continuous(ish) access to the game state. We similarly need our notion of Pareto optimal to be such that you only violate the notion if you can point out a Pareto improvement in a continuous way, which roughly corresponds to taking the interior of the notion of Pareto improvement, and thus the closure of the notion of Pareto optimal. In the next post, I plan to connect this up with the existing notion of reflective oracles, to define cooperative oracles.

 by Alex Mennen 506 days ago | Vadim Kosoy, Patrick LaVictoire, Scott Garrabrant and Stuart Armstrong like this | link This notion of dependency seems too binary to me. Concretely, let’s modify your example from the beginning so that $$P_3$$ must grant an extra $$10^{-10}$$ utility to either $$P_1$$ or $$P_2$$, and gets to decide which. Now, everyone’s utility depends on everyone’s actions, and the game is still zero-sum, so again, so any strategy profile with $$p=q$$ will be a stratified Pareto optimum. But it seems like $$P_1$$ and $$P_2$$ should ignore still ignore $$P_3$$. reply
 by Scott Garrabrant 506 days ago | link I agree with this. I think that the most interesting direction of future work is to figure out how to have better notions of dependency. I plan on writing some on this in the future, but basically we have not successfully figured out how to deal with this. reply
 by Stuart Armstrong 501 days ago | link Can you use the maximum “swing” from the other player’s decisions to get a non-binary measure of dependency? It’s similar to my idea here. Then the dependency of player $$P_i$$ on $$P_j$$ would be $$\max_{a_j} U_i - \min_{a_j} U_i$$, where $$a_j$$ are the actions of $$P_j$$. reply
 by Stuart Armstrong 501 days ago | link How about using some conception of “coalition-stable”? In which an option has that property if there is no sub-coalition of players that can unilaterally increase their utility, whatever all the other players choose to do. reply
 by Paul Christiano 498 days ago | Stuart Armstrong likes this | link This is basically the core, though it’s usually defined for cooperative games, where (a) utility is transferrable and (b) adding a new player never makes an existing player worse off. It’s easy to generalize though. reply
 by Vadim Kosoy 474 days ago | link In the infinite game example, I think that something doesn’t add up in the definition of $$f$$. A single-valued Kakutani map into a compact space is just a continuous map, but $$f$$ is not continuous. reply
 by Alex Appel 456 days ago | link It looks legitimate, actually. Remember, $$f$$ is set-valued, so if $$r_{i-1}=0$$, $$f(r)=[0,1]$$. In all other cases, $$f(r)=\frac{r_{i-1}}{2}$$. $$f$$ is a nonempty convex set-valued function, so all that’s left is to show the closed graph property. If the limiting value of $$r_{i-1}$$ is something other than 0, the closed graph property holds, and if the limiting value of $$r_{i-1}$$ is 0, the closed graph property holds because $$0\in[0,1]$$. reply
 by Vadim Kosoy 440 days ago | link Hi Alex! I agree that the multimap you described is Kakutani and gives the correct fair set, but in the OP it says that if $$r_{i-1}=0$$ then $$f(r)=r_i$$, not $$f(r)=[0,1]$$. Maybe I am missing something about the notation? reply

### NEW DISCUSSION POSTS

[Note: This comment is three
 by Ryan Carey on A brief note on factoring out certain variables | 0 likes

There should be a chat icon
 by Alex Mennen on Meta: IAFF vs LessWrong | 0 likes

Apparently "You must be
 by Jessica Taylor on Meta: IAFF vs LessWrong | 1 like

There is a replacement for
 by Alex Mennen on Meta: IAFF vs LessWrong | 1 like

Regarding the physical
 by Vadim Kosoy on The Learning-Theoretic AI Alignment Research Agend... | 0 likes

I think that we should expect
 by Vadim Kosoy on The Learning-Theoretic AI Alignment Research Agend... | 0 likes

I think I understand your
 by Jessica Taylor on The Learning-Theoretic AI Alignment Research Agend... | 0 likes

This seems like a hack. The
 by Jessica Taylor on The Learning-Theoretic AI Alignment Research Agend... | 0 likes

After thinking some more,
 by Vadim Kosoy on The Learning-Theoretic AI Alignment Research Agend... | 0 likes

Yes, I think that we're
 by Vadim Kosoy on The Learning-Theoretic AI Alignment Research Agend... | 0 likes

My intuition is that it must
 by Vadim Kosoy on The Learning-Theoretic AI Alignment Research Agend... | 0 likes

To first approximation, a
 by Vadim Kosoy on The Learning-Theoretic AI Alignment Research Agend... | 0 likes

Actually, I *am* including
 by Vadim Kosoy on The Learning-Theoretic AI Alignment Research Agend... | 0 likes

Yeah, when I went back and
 by Alex Appel on Optimal and Causal Counterfactual Worlds | 0 likes

> Well, we could give up on
 by Jessica Taylor on The Learning-Theoretic AI Alignment Research Agend... | 0 likes


text:
# Engineering Probability Exam 3 - Sat 2019-05-04

Name, RPI email:

.

.

Rules:

1. You have 80 minutes.
2. You may bring three 2-sided 8.5"x11" papers with notes.
3. You may bring a calculator.
4. You may not share material with each other during the exam.
5. No collaboration or communication (except with the staff) is allowed.
6. Check that your copy of this test has all nine pages.
7. Each part of a question is worth 5 points.
9. You may write FREE as your answer for two questions, and get the 5 points.

Questions:

1. These few questions are about the population of adult males, which has a mean of 70 inches and a standard deviation of 4 inches.

1. What is the probability that a particular person's height is between 68 and 74?

.

.

2. If we take a sample of 100, what is its mean?

.

.

3. What is its standard deviation?

.

.

2. These questions are about tossing 3 fair dice and looking at the 3 numbers that show. However, these dice have only 2 faces (to make this question easier). The faces are labeled 1 and 2.

1. What's the expected value of the number showing on the first die?

.

.

2. What's the pmf of the smallest die?

.

.

3. What's the expected value of the smallest die?

.

.

4. What's the probability that the smallest number is 1 given that the first number is 2?

.

.

5. What's the probability that the first number is 2 given that the smallest number is 1?

.

.

6. Are the first number and the smallest number are independent? Prove your answer.

.

.

7. What is the MAP estimator for the smallest number, given that the first number is 2?

.

.

3. This question is about a continuous probability distribution on 2 variables.

$$f_{XY}(x,y) = \begin{cases} c (x+y) & \text{ if } (0\le x) \ \& \ (0\le y)\ \& \ (0\le x+y \le 1) \\ 0 & \text{ otherwise}\end{cases}$$

The nonzero region is the triangle with vertices (0,0), (1,0) and (0,1).

c is some constant, but I didn't tell you what it is.

1. What is c?

.

.

2. What is $F_{XY}(x,y)$?

.

.

3. What is $f_X(x)$?

.

.

4. Are X and Y independent?

.

.

5. What is $P[X\le Y]$ ?

.

.

6. What is $E[X]$?

.

.

7. What is $COV[X,Y]$?

.

.

8. What is $\rho_{X,Y}$?

.

.

9. What is $f_Y(y|x)$?

.

.

10. What is $E[Y|x]$?

.

.

4. I'm comparing two types of widgets, red and blue. Assume that the probability of each widget dieing in a small interval dt, given that it was alive at the start, is independent of its age. Assume that the probability of the red widget dieing in the next hour is 0.1%, for the blue, it's 0.01%.

1. Give the pdf for the red widget's lifetime. (You have enough info to do this; there is only one possible probability distribution.)

.

.

2. If you have 100 red widgets, what's the probability that their mean lifetime is within 10% of the population mean?

.

.

3. If you start two widgets at the same time, what's the probability that the red widget will last longer?

.

.

Normal distribution:

x          f(x)      F(x)      Q(x)                x          f(x)      F(x)      Q(x)
-3.0000    0.0044    0.0013    0.9987             0.1000    0.3970    0.5398    0.4602
-2.9000    0.0060    0.0019    0.9981             0.2000    0.3910    0.5793    0.4207
-2.8000    0.0079    0.0026    0.9974             0.3000    0.3814    0.6179    0.3821
-2.7000    0.0104    0.0035    0.9965             0.4000    0.3683    0.6554    0.3446
-2.6000    0.0136    0.0047    0.9953             0.5000    0.3521    0.6915    0.3085
-2.5000    0.0175    0.0062    0.9938             0.6000    0.3332    0.7257    0.2743
-2.4000    0.0224    0.0082    0.9918             0.7000    0.3123    0.7580    0.2420
-2.3000    0.0283    0.0107    0.9893             0.8000    0.2897    0.7881    0.2119
-2.2000    0.0355    0.0139    0.9861             0.9000    0.2661    0.8159    0.1841
-2.1000    0.0440    0.0179    0.9821             1.0000    0.2420    0.8413    0.1587
-2.0000    0.0540    0.0228    0.9772             1.1000    0.2179    0.8643    0.1357
-1.9000    0.0656    0.0287    0.9713             1.2000    0.1942    0.8849    0.1151
-1.8000    0.0790    0.0359    0.9641             1.3000    0.1714    0.9032    0.0968
-1.7000    0.0940    0.0446    0.9554             1.4000    0.1497    0.9192    0.0808
-1.6000    0.1109    0.0548    0.9452             1.5000    0.1295    0.9332    0.0668
-1.5000    0.1295    0.0668    0.9332             1.6000    0.1109    0.9452    0.0548
-1.4000    0.1497    0.0808    0.9192             1.7000    0.0940    0.9554    0.0446
-1.3000    0.1714    0.0968    0.9032             1.8000    0.0790    0.9641    0.0359
-1.2000    0.1942    0.1151    0.8849             1.9000    0.0656    0.9713    0.0287
-1.1000    0.2179    0.1357    0.8643             2.0000    0.0540    0.9772    0.0228
-1.0000    0.2420    0.1587    0.8413             2.1000    0.0440    0.9821    0.0179
-0.9000    0.2661    0.1841    0.8159             2.2000    0.0355    0.9861    0.0139
-0.8000    0.2897    0.2119    0.7881             2.3000    0.0283    0.9893    0.0107
-0.7000    0.3123    0.2420    0.7580             2.4000    0.0224    0.9918    0.0082
-0.6000    0.3332    0.2743    0.7257             2.5000    0.0175    0.9938    0.0062
-0.5000    0.3521    0.3085    0.6915             2.6000    0.0136    0.9953    0.0047
-0.4000    0.3683    0.3446    0.6554             2.7000    0.0104    0.9965    0.0035
-0.3000    0.3814    0.3821    0.6179             2.8000    0.0079    0.9974    0.0026
-0.2000    0.3910    0.4207    0.5793             2.9000    0.0060    0.9981    0.0019
-0.1000    0.3970    0.4602    0.5398             3.0000    0.0044    0.9987    0.0013
0    0.3989    0.5000    0.5000

End of exam 3, total 100 points.

# Engineering Probability Exam 3 Solutions - Sat 2019-05-04

Name, RPI email:

WRF solutions

OK to give a formula w/o working it out.

Rules:

1. You have 80 minutes.
2. You may bring three 2-sided 8.5"x11" papers with notes.
3. You may bring a calculator.
4. You may not share material with each other during the exam.
5. No collaboration or communication (except with the staff) is allowed.
6. Check that your copy of this test has all nine pages.
7. Each part of a question is worth 5 points.

Questions:

1. These few questions are about the population of adult males, which has a mean of 70 inches and a standard deviation of 4 inches.

1. What is the probability that a particular person's height is between 68 and 74?

68 is mean - std/2

74 is mean + std

Q(-.5) - Q(1) = .69 - .16 = .53

2. If we take a sample of 100, what is its mean?

100.

3. What is its standard deviation?

4/sqrt(100) = .4

2. These questions are about tossing 3 fair dice and looking at the 3 numbers that show. However, these dice have only 4 faces (to make this question easier).

1. What's the expected value of the number showing on the first die?

2.5

2. What's the pmf of the smallest die?

Enumeration works. 8 cases: 111, 112, 121, 122, 211, 212, 221, 222

Let X = smallest die.

p(X=1) = 7/8, p(X=2)=1/8

3. What's the expected value of the smallest die?

1/8 * 2 + 7/8 * 1 = 9/8

4. What's the probability that the smallest number is 1 given that the first number is 2?

Enumerate. p= 3/4

5. What's the probability that the first number is 2 given that the smallest number is 1?

3/7

6. Are the first number and the smallest number are independent? Prove your answer.

p(1st is 2) = 1/2. p(smallest is 2) = 1/8. p(1st is 2 and smallest is 2) = 1/4

1/2 * 1/8 ne 1/4. Not independent

7. What is the MAP estimator for the smallest number, given that the first number is 2?

P[smallest is 1|first is 2] = 3/4, so MAP = 1

3. This question is about a continuous probability distribution on 2 variables.

$$f_{XY}(x,y) = \begin{cases} c (x+y) & \text{ if } (0\le x) \ \& \ (0\le y)\ \& \ (0\le x+y \le 1) \\ 0 & \text{ otherwise}\end{cases}$$

The nonzero region is the triangle with vertices (0,0), (1,0) and (0,1).

c is some constant, but I didn't tell you what it is.

1. What is c?

The integral is 1/3.

c=3

2. What is $F_{XY}(x,y)$?

$$F_{XY}(x,y)=\begin{cases} 0 & \text{ if } x\le0 \cup y\le0 \\ 1 & \text{ if } x\ge 1 \cap y\ge1 \\ 3/2 (x^2y+xy^2) & \text{ if } 0\le x \cap 0\le y \cap x+y\le1 \\ (\int_0^x\int_0^{1-x} + \int_0^{1-y}\int_{1-x}^y + \int_{1-y}^x\int_{1-x}^{1-x_0}) (3(x_0+y_0) dy_0dx_0) & \text{ otherwise}\end{cases}$$

The last case above splits the nonzero integration region into two rectangles and a triangle.

It's also acceptable to draw a figure and say something intelligent w/o being explicit about all the details.

3. What is $f_X(x)$?

$f_X(x)= \int_0^{1-x}f_{XY}(x,y) dy = 3/2 (1-x)^2, 0\le x\le1$

Note that $\int_0^1 f_X(x)=1$, which is correct.

4. Are X and Y independent?

$f_X(x)= 3/2 (1-x)^2$

$f_Y(y)= 3/2 (1-y)^2$

$f_{XY}(x,y)= 3(x+y)\ne f_X(x) f_Y(y)$

no.

5. What is $P[X\le Y]$ ?

Integrate: $\int_0^1 \int_0^{\min{x,1-x)} f(x0,y0) dy0 dx0 = 1/2$

That's reasonable because X and Y are symmetric.

The box around the above expression is a meaningless unwanted artifact.

6. What is $E[X]$?

1/8

7. What is $COV[X,Y]$?

E[XY] = 1/10. E[Y] = E[X]. COV = 1/10 - 1/8 * 1/8 = .085.

8. What is $\rho_{X,Y}$?

OK to write the formula

9. What is $f_Y(y|x)$?

In the nonzero triangle, $f_Y(y|x)=F_{XY}(x,y)/F_X(x)$

10. What is $E[Y|x]$?

$\int yf_Y(y|x) dy$

4. I'm comparing two types of widgets, red and blue. Assume that the probability of each widget dieing in a small interval dt, given that it was alive at the start, is independent of its age. Assume that the probability of the red widget dieing in the next hour is 0.1%, for the blue, it's 0.01%.

1. Give the pdf for the red widget's lifetime. (You have enough info to do this; there is only one possible probability distribution.)

exponential.

$f(x) = l e^{-l}$

From the section on reliability, l=001.

2. If you have 100 red widgets, what's the probability that their mean lifetime is within 10% of the mean?

Normal approx works.

Pop variance: $1/l^2$

Sample variance: $1/(100 l^2)$

Sample std: $1/(10 l)$

Pop and sample mean: $1/l$

sample mean w/i 10% of pop mean = w/i one sample std

Prob: Q(-1) - Q(1) = .68

3. If you start two widgets at the same time, what's the probability that the red widget will last longer?

let x be lifetime of a red widget, y blue.

$l_1=0.001, l_2=0.0001$

joint prob: $F(x,y) = l_1 l_2 \exp(-l_1x -l_2y)$

$P[X>Y] = \int_0^\infty \int_0^x F(x,y) dy dx$

Normal distribution:

x          f(x)      F(x)      Q(x)
-3.0000    0.0044    0.0013    0.9987
-2.9000    0.0060    0.0019    0.9981
-2.8000    0.0079    0.0026    0.9974
-2.7000    0.0104    0.0035    0.9965
-2.6000    0.0136    0.0047    0.9953
-2.5000    0.0175    0.0062    0.9938
-2.4000    0.0224    0.0082    0.9918
-2.3000    0.0283    0.0107    0.9893
-2.2000    0.0355    0.0139    0.9861
-2.1000    0.0440    0.0179    0.9821
-2.0000    0.0540    0.0228    0.9772
-1.9000    0.0656    0.0287    0.9713
-1.8000    0.0790    0.0359    0.9641
-1.7000    0.0940    0.0446    0.9554
-1.6000    0.1109    0.0548    0.9452
-1.5000    0.1295    0.0668    0.9332
-1.4000    0.1497    0.0808    0.9192
-1.3000    0.1714    0.0968    0.9032
-1.2000    0.1942    0.1151    0.8849
-1.1000    0.2179    0.1357    0.8643
-1.0000    0.2420    0.1587    0.8413
-0.9000    0.2661    0.1841    0.8159
-0.8000    0.2897    0.2119    0.7881
-0.7000    0.3123    0.2420    0.7580
-0.6000    0.3332    0.2743    0.7257
-0.5000    0.3521    0.3085    0.6915
-0.4000    0.3683    0.3446    0.6554
-0.3000    0.3814    0.3821    0.6179
-0.2000    0.3910    0.4207    0.5793
-0.1000    0.3970    0.4602    0.5398
0    0.3989    0.5000    0.5000
0.1000    0.3970    0.5398    0.4602
0.2000    0.3910    0.5793    0.4207
0.3000    0.3814    0.6179    0.3821
0.4000    0.3683    0.6554    0.3446
0.5000    0.3521    0.6915    0.3085
0.6000    0.3332    0.7257    0.2743
0.7000    0.3123    0.7580    0.2420
0.8000    0.2897    0.7881    0.2119
0.9000    0.2661    0.8159    0.1841
1.0000    0.2420    0.8413    0.1587
1.1000    0.2179    0.8643    0.1357
1.2000    0.1942    0.8849    0.1151
1.3000    0.1714    0.9032    0.0968
1.4000    0.1497    0.9192    0.0808
1.5000    0.1295    0.9332    0.0668
1.6000    0.1109    0.9452    0.0548
1.7000    0.0940    0.9554    0.0446
1.8000    0.0790    0.9641    0.0359
1.9000    0.0656    0.9713    0.0287
2.0000    0.0540    0.9772    0.0228
2.1000    0.0440    0.9821    0.0179
2.2000    0.0355    0.9861    0.0139
2.3000    0.0283    0.9893    0.0107
2.4000    0.0224    0.9918    0.0082
2.5000    0.0175    0.9938    0.0062
2.6000    0.0136    0.9953    0.0047
2.7000    0.0104    0.9965    0.0035
2.8000    0.0079    0.9974    0.0026
2.9000    0.0060    0.9981    0.0019
3.0000    0.0044    0.9987    0.0013

End of exam 3, total 70 points.

# Engineering Probability Class 28 Thu 2019-04-25

## 1   Exam 3

Bring 3 2-sided crib sheets.

Lingyu computed piazza and iclicker grades.

For iclickers:

1. They were used in 13 classes.
2. You got 1 point for each class that you used your iclicker.
3. Multiply the total by 10/13.

For piazza:

1. For each of 3 months, 1 point per contribution, up to 2 points.
2. Then multiply by 10/6.

I computed a percent grade to date.

I uploaded it in column Tot1 to LMS.

It cannot fall, but may rise, because:

1. You got knowitall points. I haven't yet included them.
3. You write exam 3 and it helps.

If the class wishes, I can lower the weight of the piazza grade from 10% to 5%, and scale everything else up. Do you wish?

The letter grades will be at least as generous as the syllabus shows. I may lower the cutoffs.

I believe my courses to have higher GPAs than average.

## 3   Piazza and iclicker

They're a mess to compute.

I use them because I believe them to be pedagogically good.

However what do you, the class, think?

# Engineering Probability Class 27 Mon 2019-04-22

1. The 3rd exam will be the same length as the first two: 80 minutes.
2. I will distribute a guaranteed minimum grade at the end of the semester. If you are satisfied with that, you do not need to write the third exam.

## 2   Statistics videos

1. Regression: Crash Course Statistics #32 (12:40) https://www.youtube.com/watch?v=WWqE7YHR4Jc

## 3   8.4 Confidence intervals, p 430

The earlier videos introduced you to this.

## 4   Worked out problems

1. 7.14a, p 403.

2. 8.4 p 471.

Normal probability tables were given in class 20.

3. 8.10, p 472.

4. 8.24, p 474.

TABLE 3.1 Discrete random variables is page 115.

TABLE 4.1 Continuous random variables is page 164.

# Engineering Probability Class 26 Thu 2019-04-18

## 1   Homework 11

is online.

Sample book problems.

1. 8.3, p 471.

## 2   Statistics

Here's a sampling of this large topic. There are many other tests, each for a particular purpose.

### 2.1   Statistics videos

1. 10-1 Guinness, Student, and the History of t Tests (16:58) https://www.youtube.com/watch?v=bqfcFCjaE1c
2. 12-2 ANOVA – Variance Between and Within (12:51) https://www.youtube.com/watch?v=fK_l63PJ7Og
3. 15-1 Why Non Parametric Statistics? (6.52) https://www.youtube.com/watch?v=xA0QcbNxENs
4. Regression: Crash Course Statistics #32 (12:40) https://www.youtube.com/watch?v=WWqE7YHR4Jc

# Engineering Probability Homework 11 due Thu 2019-04-25

All questions are from the text.

Each part of a question is worth 5 points, except for 8.101.

1. 8.1 (a-e) p 471. You decide how to generate the random samples, perhaps with Matlab or Mathematica.
2. 8.2 (a-e).
3. 8.49 (a-b), p 478.
4. 8.101, p 486. 10 points.

Total: 70 points.

# Engineering Probability Class 25 Mon 2019-04-15

## 1   Iclicker

All these questions concern math SAT scores, which we assume have a mean of 500 and standard deviation of 100.

1. What is the probability that one particular score is between 400 and 600?
1. .34
2. .68
3. .96
4. .98
5. .9974
2. I take a random sample of 4 students, and compute the mean of their 4 scores. What is the probability that that mean is between 400 and 600?
1. .34
2. .68
3. .96
4. .98
5. .9974
3. I take a random sample of 9 students, and compute the mean of their 9 scores. What is the probability that that mean is between 400 and 600?
1. .34
2. .68
3. .96
4. .98
5. .9974
4. What is the standard deviation of the 4-student sample?
1. 25
2. 33
3. 50
4. 100
5. 200
5. What is the standard deviation of the 9-student sample?
1. 25
2. 33
3. 50
4. 100
5. 200

## 2   Statistics

Now, we learn statistics. That means, determining parameters of a population by sampling it. In probability, we already know that parameters, and calculate things from them.

This course module fits with RPI's goal of a data dexterity requirement for undergrads. Pres Jackson mentioned this at the spring town meet; see https://president.rpi.edu/speeches/2019/remarks-spring-town-meeting .

Disclosure: Prof Dave Mendonca and I are co-chairs of the SoE Data Dexterity Task Force, working out details of this.

### 2.1   Hypothesis testing, from text (plus extras)

1. Say we want to test whether the average height of an RPI student (called the population) is 2m.
2. We assume that the distribution is Gaussian (normal) and that the standard deviation of heights is, say, 0.2m.
3. However we don't know the mean.
4. We do an experiment and measure the heights of n=100 random students. Their mean height is, say, 1.9m.
5. The question on the table is, is the population mean 2m?
6. This is different from the earlier question that we analyzed, which was this: What is the most likely population mean? (Answer: 1.9m.)
7. Now we have a hypothesis (that the population mean is 2m) that we're testing.
8. The standard way that this is handled is as follows.
9. Define a null hypothesis, called H0, that the population mean is 2m.
10. Define an alternate hypothesis, called HA, that the population mean is not 2m.
11. Note that we observed our sample mean to be $0.5 \sigma$ below the population mean, if H0 is true.
12. Each time we rerun the experiment (measure 100 students) we'll observe a different number.
13. We compute the probability that, if H0 is true, our sample mean would be this far from 2m.
14. Depending on what our underlying model of students is, we might use a 1-tail or a 2-tail probability.
15. Perhaps we think that the population mean might be less than 2m but it's not going to be more. Then a 1-tail distribution makes sense.
16. That is, our assumptions affect the results.
17. The probability is Q(5), which is very small.
18. Therefore we reject H0 and accept HA.
19. We make a type-1 error if we reject H0 and it was really true. See http://en.wikipedia.org/wiki/Type_I_and_type_II_errors
20. We make a type-2 error if we accept H0 and it was really false.
21. These two errors trade off: by reducing the probability of one we increase the probability of the other, for a given sample size.
22. E.g. in a criminal trial we prefer that a guilty person go free to having an innocent person convicted.
23. Rejecting H0 says nothing about what the population mean really is, just that it's not likely 2m.
24. Enrichment. Random sampling is hard. The US government got it wrong here: http://politics.slashdot.org/story/11/05/13/2249256/Algorithm-Glitch-Voids-Outcome-of-US-Green-Card-Lottery
25. The above tests, called z-tests, assumed that we know the population variance.
26. If we don't know the population variance, we can estimate it by sampling.
27. We can combine estimating the population variance with testing the hypothesis into one test, called the t-test.

### 2.2   Dr Nic's videos

Understanding the Central Limit Theorem https://www.youtube.com/watch?v=_YOr_yYPytM

Understanding Hypothesis testing, p-value, t-test - Statistics Help https://www.youtube.com/watch?v=0zZYBALbZgg

### 2.3   Research By Design videos

10-1 Guinness, Student, and the History of t Tests https://www.youtube.com/watch?v=bqfcFCjaE1c

# Engineering Probability Class 24 Thu 2019-04-11

## 2   Material from text

### 2.1   Chapter 7, p 359, Sums of Random Variables

The long term goal of this section is to summarize information from a large group of random variables. E.g., the mean is one way. We will start with that, and go farther.

The next step is to infer the true mean of a large set of variables from a small sample.

### 2.2   Sums of random variables ctd

1. Let Z=X+Y.

2. $f_Z$ is convolution of $f_X$ and $f_Y$: $$f_Z(z) = (f_X * f_Y)(z)$$ $$f_Z(z) = \int f_X(x) f_Y(z-x) dx$$

3. Characteristic functions are useful. They are covered in Section 4.7.1 on page 184.

$$\Phi_X(\omega) = E[e^{j\omega X} ]$$

4. $\Phi_Z = \Phi_X \Phi_Y$.

5. This extends to the sum of n random variables: if $Z=\sum_i X_i$ then $\Phi_Z (\omega) = \Pi_i \Phi_{X_i} (\omega)$

6. E.g. Exponential with $\lambda=1$: $\Phi_1(\omega) = 1/(1-j\omega)$ (page 164).

7. Sum of m exponentials has $\Phi(\omega)= 1/{(1-j\omega)}^m$. That's called an m-Erlang.

8. Example 2: sum of n iid Bernoullis. Probability generating function is more useful for discrete random variables.

9. Example 3: sum of n iid Gaussians. $$\Phi_{X_1} = e^{j\mu\omega - \frac{1}{2} \sigma^2 \omega^2}$$ $$\Phi_{Z} = e^{jn\mu\omega - \frac{1}{2}n \sigma^2 \omega^2}$$ I.e., mean and variance sum.

10. As the number increases, no matter what distribution the initial random variance is (provided that its moments are finite), for the sum $\Phi$ starts looking like a Gaussian.

11. The mean $M_n$ of n random variables is itself a random variable.

12. As $n\rightarrow\infty$ $M_n \rightarrow \mu$.

13. That's a law of large numbers (LLN).

14. $E[ M_n ] = \mu$. It's an unbiased estimator.

15. $VAR[ M_n ] = n \sigma ^2$

16. Weak law of large numbers $$\forall \epsilon >0 \lim_{n\rightarrow\infty} P[ |M_n-\mu| < \epsilon] = 1$$

17. How fast does it happen? We can use Chebyshev, though that is very conservative.

18. Strong law of large numbers $$P [ \lim _ {n\rightarrow\infty} M_n = \mu ] =1$$

19. As $n\rightarrow\infty$, $F_{M_n}$ becomes Gaussian. That's the Central Limit Theorem (CLT).

## 3   Counterintuitive things in statistics

Statistics has some surprising examples, which would appear to be impossible. Here are some.

1. Average income can increase faster in a whole country than in any part of the country.

1. Consider a country with two parts: east and west.
2. Each part has 100 people.
3. Each person in the west makes \$100 per year; each person in the east \$200.
4. The total income in the west is \$10K, in the east \$20K, and in the whole country \$30K. 5. The average income in the west is \$100, in the east \$200, and in the whole country \$150.
6. Assume that next year nothing changes except that one westerner moves east and gets an average eastern job, so he now makes \$200 instead of \$100.
7. The west now has 99 people @ \$100; its average income didn't change. 8. The east now has 101 people @ \$200; its average income didn't change.
9. The whole country's income is \$30100 for an average of \$150.50; that went up.
2. College acceptance rate surprise.

1. Imagine that we have two groups of people: Albanians and Bostonians.

2. They're applying to two programs at the university: Engineering and Humanities.

3. Here are the numbers. The fractions are accepted/applied.

city-major Engin Human Total
Albanians 11/15 2/5 13/20
Bostonians 4/5 7/15 11/20
Total 15/20 9/20 24/40

E.g, 15 Albanians applied to Engin; 11 were accepted.

4. Note that in Engineering, a smaller fraction of Albanian applicants were accepted than Bostonian applicants. (corrected)

5. Ditto in Humanities.

6. However in all, a larger fraction of Albanian applicants were accepted than Bostonian applicants.

3. I could go on.

## 4   Relevant Xkcd comics

### 4.1   Chapter 8, Statistics

1. We have a population. (E.g., voters in next election, who will vote Democrat or Republican).

2. We don't know the population mean. (E.g., fraction of voters who will vote Democrat).

3. We take several samples (observations). From them we want to estimate the population mean and standard deviation. (Ask 1000 potential voters; 520 say they will vote Democrat. Sample mean is .52)

4. We want error bounds on our estimates. (.52 plus or minus .04, 95 times out of 100)

5. Another application: testing whether 2 populations have the same mean. (Is this batch of Guiness as good as the last one?)

6. Observations cost money, so we want to do as few as possible.

7. This gets beyond this course, but the biggest problems may be non-math ones. E.g., how do you pick a random likely voter? In the past phone books were used. In a famous 1936 Presidential poll, that biased against poor people, who voted for Roosevelt.

8. In probability, we know the parameters (e.g., mean and standard deviation) of a distribution and use them to compute the probability of some event.

E.g., if we toss a fair coin 4 times what's the probability of exactly 4 heads? Answer: 1/16.

9. In statistics we do not know all the parameters, though we usually know that type the distribution is, e.g., normal. (We often know the standard deviation.)

1. We make observations about some members of the distribution, i.e., draw some samples.
2. From them we estimate the unknown parameters.
3. We often also compute a confidence interval on that estimate.
4. E.g., we toss an unknown coin 100 times and see 60 heads. A good estimate for the probability of that coin coming up heads is 0.6.
10. Some estimators are better than others, though that gets beyond this course.

1. Suppose I want to estimate the average height of an RPI student by measuring the heights of N random students.
2. The mean of the highest and lowest heights of my N students would converge to the population mean as N increased.
3. However the median of my sample would converge faster. Technically, the variance of the sample median is smaller than the variance of the sample hi-lo mean.
4. The mean of my whole sample would converge the fastest. Technically, the variance of the sample mean is smaller than the variance of any other estimator of the population mean. That's why we use it.
5. However perhaps the population's distribution is not normal. Then one of the other estimators might be better. It would be more robust.
11. (Enrichment) How to tell if the population is normal? We can do various plots of the observations and look. We can compute the probability that the observations would be this uneven if the population were normal.

12. An estimator may be biased. We have an distribution that is U[0,b] for unknown b. We take a sample. The max of the sample has a mean n/(n+1)b though it converges to b as n increases.

13. Example 8.2, page 413: One-tailed probability. This is the probability that the mean of our sample is at least so far above the population mean. $$\alpha = P[\overline{X_n}-\mu > c] = Q\left( \frac{c}{\sigma_x / \sqrt{n} } \right)$$ Q is defined on page 169: $$Q(x) = \int_x^ { \infty} \frac{1}{\sqrt{2\pi} } e^{-\frac{x^2}{2} } dx$$

14. Application: You sample n=100 students' verbal SAT scores, and see $\overline{X} = 550$. You know that $\sigma=100$. If $\mu = 525$, what is the probability that $\overline{X_n} > 550$ ?

15. This means that if we take 1000 random sample of students, each with 100 students, and measure each sample's mean, then, on average, 6 of those 1000 samples will have a mean over 550.

16. This is often worded as the probability of the population's mean being under 525 is 0.006, which is different. The problem with saying that is that presumes some probability distribution for the population mean.

17. The formula also works for the other tail, computing the probability that our sample mean is at least so far below the population mean.

18. The 2-tail probability is the probability that our sample mean is at least this far away from the sample mean in either direction. It is twice the 1-tail probability.

19. All this also works when you know the probability and want to know c, the cutoff.

### 4.2   Hypothesis testing

1. Say we want to test whether the average height of an RPI student (called the population) is 2m.
2. We assume that the distribution is Gaussian (normal) and that the standard deviation of heights is, say, 0.2m.
3. However we don't know the mean.
4. We do an experiment and measure the heights of n=100 random students. Their mean height is, say, 1.9m.
5. The question on the table is, is the population mean 2m?
6. This is different from the earlier question that we analyzed, which was this: What is the most likely population mean? (Answer: 1.9m.)
7. Now we have a hypothesis (that the population mean is 2m) that we're testing.
8. The standard way that this is handled is as follows.
9. Define a null hypothesis, called H0, that the population mean is 2m.
10. Define an alternate hypothesis, called HA, that the population mean is not 2m.
11. Note that we observed our sample mean to be $0.5 \sigma$ below the population mean, if H0 is true.
12. Each time we rerun the experiment (measure 100 students) we'll observe a different number.
13. We compute the probability that, if H0 is true, our sample mean would be this far from 2m.
14. Depending on what our underlying model of students is, we might use a 1-tail or a 2-tail probability.
15. Perhaps we think that the population mean might be less than 2m but it's not going to be more. Then a 1-tail distribution makes sense.
16. That is, our assumptions affect the results.
17. The probability is Q(5), which is very small.
18. Therefore we reject H0 and accept HA.
19. We make a type-1 error if we reject H0 and it was really true. See http://en.wikipedia.org/wiki/Type_I_and_type_II_errors
20. We make a type-2 error if we accept H0 and it was really false.
21. These two errors trade off: by reducing the probability of one we increase the probability of the other, for a given sample size.
22. E.g. in a criminal trial we prefer that a guilty person go free to having an innocent person convicted.
23. Rejecting H0 says nothing about what the population mean really is, just that it's not likely 2m.
24. (Enrichment) Random sampling is hard. The US government got it wrong here:
http://politics.slashdot.org/story/11/05/13/2249256/Algorithm-Glitch-Voids-Outcome-of-US-Green-Card-Lottery

# Engineering Probability Homework 10 due Thu 2019-04-18

All questions are from the text.

Each part of a question is worth 5 points.

1. 6.68 (c), p 355. Use pmf (i).
2. 6.92 (a-d), p 358.

Total: 25 points.

# Engineering Probability Class 23 Mon 2019-04-08

## 2   Mathematica demos

I put last class's mathematica demo online under Files - Mathematica. There are 2 versions: class22.pdf, a PDF file, you can view, and class22.nb, a Mathematica workbook, you can open in Mathematica and play with.

## 3   Material from text

### 3.1   Section 6.5, page 332: Estimation of random variables

1. Assume that we want to know X but can only see Y, which depends on X.

2. This is a generalization of our long-running noisy communication channel example. We'll do things a little more precisely now.

3. Another application would be to estimate tomorrow's price of GOOG (X) given the prices to date (Y).

4. Sometimes, but not always, we have a prior probability for X.

5. For the communication channel we do, for GOOG, we don't.

6. If we do, it's a ''maximum a posteriori estimator''.

7. If we don't, it's a ''maximum likelihood estimator''. We effectively assume that that prior probability of X is uniform, even though that may not completely make sense.

8. You toss a fair coin 3 times. X is the number of heads, from 0 to 3. Y is the position of the 1st head. from 0 to 3. If there are no heads, we'll say that the first head's position is 0.

(X,Y) p(X,Y)
(0,0) 1/8
(1,1) 1/8
(1,2) 1/8
(1,3) 1/8
(2,1) 2/8
(2,2) 1/8
(3,1) 1/8

E.g., 1 head can occur 3 ways (out of 8): HTT, THT, TTH. The 1st (and only) head occurs in position 1, one of those ways. p=1/8.

9. Conditional probabilities:

p(x|y) y=0 y=1 y=2 y=3
x=0 1 0 0 0
x=1 0 1/4 1/2 1
x=2 0 1/2 1/2 0
x=3 0 1/4 0 0

$g_{MAP}(y)$ 0 2 1 or 2 1
$P_{error}(y)$ 0 1/2 1/2 0
p(y) 1/8 1/2 1/4 1/8

The total probability of error is 3/8.

10. We observe Y and want to guess X from Y. E.g., If we observe $$\small y= \begin{pmatrix}0\\1\\2\\3\end{pmatrix} \text{then } x= \begin{pmatrix}0\\ 2 \text{ most likely} \\ 1, 2 \text{ equally likely} \\ 1 \end{pmatrix}$$

11. There are different formulae. The above one was the MAP, maximum a posteriori probability.

$$g_{\text{MAP}} (y) = \max_x p_x(x|y) \text{ or } f_x(x|y)$$

That means, the value of $x$ that maximizes $p_x(x|y)$

12. What if we don't know p(x|y)? If we know p(y|x), we can use Bayes. We might measure p(y|x) experimentally, e.g., by sending many messages over the channel.

13. Bayes requires p(x). What if we don't know even that? E.g. we don't know the probability of the different possible transmitted messages.

14. Then use maximum likelihood estimator, ML. $$g_{\text{ML}} (y) = \max_x p_y(y|x) \text{ or } f_y(y|x)$$

15. There are other estimators for different applications. E.g., regression using least squares might attempt to predict a graduate's QPA from his/her entering SAT scores. At Saratoga in August we might attempt to predict a horse's chance of winning a race from its speed in previous races. Some years ago, an Engineering Assoc Dean would do that each summer.

16. Historically, IMO, some of the techniques, like least squares and logistic regression, have been used more because they're computationally easy than because they're logically justified.

### 3.2   Chapter 7, p 359, Sums of Random Variables

The long term goal of this section is to summarize information from a large group of random variables. E.g., the mean is one way. We will start with that, and go farther.

The next step is to infer the true mean of a large set of variables from a small sample.

### 3.3   Sums of random variables ctd

1. Let Z=X+Y.
2. $f_Z$ is convolution of $f_X$ and $f_Y$: $$f_Z(z) = (f_X * f_Y)(z)$$ $$f_Z(z) = \int f_X(x) f_Y(z-x) dx$$
3. Characteristic functions are useful. $$\Phi_X(\omega) = E[e^{j\omega X} ]$$
4. $\Phi_Z = \Phi_X \Phi_Y$.
5. This extends to the sum of n random variables: if $Z=\sum_i X_i$ then $\Phi_Z (\omega) = \Pi_i \Phi_{X_i} (\omega)$
6. E.g. Exponential with $\lambda=1$: $\Phi_1(\omega) = 1/(1-j\omega)$ (page 164).
7. Sum of m exponentials has $\Phi(\omega)= 1/{(1-j\omega)}^m$. That's called an m-Erlang.
8. Example 2: sum of n iid Bernoullis. Probability generating function is more useful for discrete random variables.
9. Example 3: sum of n iid Gaussians. $$\Phi_{X_1} = e^{j\mu\omega - \frac{1}{2} \sigma^2 \omega^2}$$ $$\Phi_{Z} = e^{jn\mu\omega - \frac{1}{2}n \sigma^2 \omega^2}$$ I.e., mean and variance sum.
10. As the number increases, no matter what distribution the initial random variance is (provided that its moments are finite), for the sum $\Phi$ starts looking like a Gaussian.
11. The mean $M_n$ of n random variables is itself a random variable.
12. As $n\rightarrow\infty$ $M_n \rightarrow \mu$.
13. That's a law of large numbers (LLN).
14. $E[ M_n ] = \mu$. It's an unbiased estimator.
15. $VAR[ M_n ] = n \sigma ^2$
16. Weak law of large numbers $$\forall \epsilon >0 \lim_{n\rightarrow\infty} P[ |M_n-\mu| < \epsilon] = 1$$
17. How fast does it happen? We can use Chebyshev, though that is very conservative.
18. Strong law of large numbers $$P [ \lim _ {n\rightarrow\infty} M_n = \mu ] =1$$
19. As $n\rightarrow\infty$, $F_{M_n}$ becomes Gaussian. That's the Central Limit Theorem (CLT).

## 4   Counterintuitive things in statistics

Statistics has some surprising examples, which would appear to be impossible. Here are some.

1. Average income can increase faster in a whole country than in any part of the country.

1. Consider a country with two parts: east and west.
2. Each part has 100 people.
3. Each person in the west makes \$100 per year; each person in the east \$200.
4. The total income in the west is \$10K, in the east \$20K, and in the whole country \$30K. 5. The average income in the west is \$100, in the east \$200, and in the whole country \$150.
6. Assume that next year nothing changes except that one westerner moves east and gets an average eastern job, so he now makes \$200 instead of \$100.
7. The west now has 99 people @ \$100; its average income didn't change. 8. The east now has 101 people @ \$200; its average income didn't change.
9. The whole country's income is \$30100 for an average of \$150.50; that went up.
2. College acceptance rate surprise.

1. Imagine that we have two groups of people: Albanians and Bostonians.

2. They're applying to two programs at the university: Engineering and Humanities.

3. Here are the numbers. The fractions are accepted/applied.

city-major Engin Human Total
Albanians 11/15 2/5 13/20
Bostonians 4/5 7/15 11/20
Total 15/20 9/20 24/40

E.g, 15 Albanians applied to Engin; 11 were accepted.

4. Note that in Engineering, a smaller fraction of Albanian applicants were accepted than Bostonian applicants. (corrected)

5. Ditto in Humanities.

6. However in all, a larger fraction of Albanian applicants were accepted than Bostonian applicants.

3. I could go on.

## 5   Relevant Xkcd comics

### 5.1   Chapter 8, Statistics

1. We have a population. (E.g., voters in next election, who will vote Democrat or Republican).

2. We don't know the population mean. (E.g., fraction of voters who will vote Democrat).

3. We take several samples (observations). From them we want to estimate the population mean and standard deviation. (Ask 1000 potential voters; 520 say they will vote Democrat. Sample mean is .52)

4. We want error bounds on our estimates. (.52 plus or minus .04, 95 times out of 100)

5. Another application: testing whether 2 populations have the same mean. (Is this batch of Guiness as good as the last one?)

6. Observations cost money, so we want to do as few as possible.

7. This gets beyond this course, but the biggest problems may be non-math ones. E.g., how do you pick a random likely voter? In the past phone books were used. In a famous 1936 Presidential poll, that biased against poor people, who voted for Roosevelt.

8. In probability, we know the parameters (e.g., mean and standard deviation) of a distribution and use them to compute the probability of some event.

E.g., if we toss a fair coin 4 times what's the probability of exactly 4 heads? Answer: 1/16.

9. In statistics we do not know all the parameters, though we usually know that type the distribution is, e.g., normal. (We often know the standard deviation.)

1. We make observations about some members of the distribution, i.e., draw some samples.
2. From them we estimate the unknown parameters.
3. We often also compute a confidence interval on that estimate.
4. E.g., we toss an unknown coin 100 times and see 60 heads. A good estimate for the probability of that coin coming up heads is 0.6.
10. Some estimators are better than others, though that gets beyond this course.

1. Suppose I want to estimate the average height of an RPI student by measuring the heights of N random students.
2. The mean of the highest and lowest heights of my N students would converge to the population mean as N increased.
3. However the median of my sample would converge faster. Technically, the variance of the sample median is smaller than the variance of the sample hi-lo mean.
4. The mean of my whole sample would converge the fastest. Technically, the variance of the sample mean is smaller than the variance of any other estimator of the population mean. That's why we use it.
5. However perhaps the population's distribution is not normal. Then one of the other estimators might be better. It would be more robust.
11. (Enrichment) How to tell if the population is normal? We can do various plots of the observations and look. We can compute the probability that the observations would be this uneven if the population were normal.

12. An estimator may be biased. We have an distribution that is U[0,b] for unknown b. We take a sample. The max of the sample has a mean n/(n+1)b though it converges to b as n increases.

13. Example 8.2, page 413: One-tailed probability. This is the probability that the mean of our sample is at least so far above the population mean. $$\alpha = P[\overline{X_n}-\mu > c] = Q\left( \frac{c}{\sigma_x / \sqrt{n} } \right)$$ Q is defined on page 169: $$Q(x) = \int_x^ { \infty} \frac{1}{\sqrt{2\pi} } e^{-\frac{x^2}{2} } dx$$

14. Application: You sample n=100 students' verbal SAT scores, and see $\overline{X} = 550$. You know that $\sigma=100$. If $\mu = 525$, what is the probability that $\overline{X_n} > 550$ ?

15. This means that if we take 1000 random sample of students, each with 100 students, and measure each sample's mean, then, on average, 6 of those 1000 samples will have a mean over 550.

16. This is often worded as the probability of the population's mean being under 525 is 0.006, which is different. The problem with saying that is that presumes some probability distribution for the population mean.

17. The formula also works for the other tail, computing the probability that our sample mean is at least so far below the population mean.

18. The 2-tail probability is the probability that our sample mean is at least this far away from the sample mean in either direction. It is twice the 1-tail probability.

19. All this also works when you know the probability and want to know c, the cutoff.

### 5.2   Hypothesis testing

1. Say we want to test whether the average height of an RPI student (called the population) is 2m.
2. We assume that the distribution is Gaussian (normal) and that the standard deviation of heights is, say, 0.2m.
3. However we don't know the mean.
4. We do an experiment and measure the heights of n=100 random students. Their mean height is, say, 1.9m.
5. The question on the table is, is the population mean 2m?
6. This is different from the earlier question that we analyzed, which was this: What is the most likely population mean? (Answer: 1.9m.)
7. Now we have a hypothesis (that the population mean is 2m) that we're testing.
8. The standard way that this is handled is as follows.
9. Define a null hypothesis, called H0, that the population mean is 2m.
10. Define an alternate hypothesis, called HA, that the population mean is not 2m.
11. Note that we observed our sample mean to be $0.5 \sigma$ below the population mean, if H0 is true.
12. Each time we rerun the experiment (measure 100 students) we'll observe a different number.
13. We compute the probability that, if H0 is true, our sample mean would be this far from 2m.
14. Depending on what our underlying model of students is, we might use a 1-tail or a 2-tail probability.
15. Perhaps we think that the population mean might be less than 2m but it's not going to be more. Then a 1-tail distribution makes sense.
16. That is, our assumptions affect the results.
17. The probability is Q(5), which is very small.
18. Therefore we reject H0 and accept HA.
19. We make a type-1 error if we reject H0 and it was really true. See http://en.wikipedia.org/wiki/Type_I_and_type_II_errors
20. We make a type-2 error if we accept H0 and it was really false.
21. These two errors trade off: by reducing the probability of one we increase the probability of the other, for a given sample size.
22. E.g. in a criminal trial we prefer that a guilty person go free to having an innocent person convicted.
23. Rejecting H0 says nothing about what the population mean really is, just that it's not likely 2m.
24. (Enrichment) Random sampling is hard. The US government got it wrong here:
http://politics.slashdot.org/story/11/05/13/2249256/Algorithm-Glitch-Voids-Outcome-of-US-Green-Card-Lottery


text:
• Question Tag: drag coefficient
Filter by
Filter by
Questions Per Page:
• ## Find the lift and wave drag coefficients for an infinitely thin flat plate.

Find the lift and wave drag coefficients for an infinitely thin flat plate at an angle of attack of $$8^{\circ}$$ …

Asked on 26th March 2021 in
• 78 views
• ## Find the total drag of an airplane.

Find the total drag of an airplane flying at a velocity of $$90\,m/s$$ with $$L/D$$ ratio maximum. Airplane is weighing …

Asked on 3rd February 2021 in
• 73 views
• ## Induced drag and elliptical wing

Why induced drag is minimum for an elliptical wing planform ?

Asked on 17th December 2020 in
• 154 views
• ## PollInduced drag is minimum for which type of a wing planform

Induced drag is minimum for which type of a wing planform

Asked on 17th November 2020 in
• 72 views
• ## What are profile drag, parasite drag, induced drag and wave drag ?

What are profile drag, parasite drag, induced drag and wave drag ?

Asked on 30th October 2020 in
• 335 views
• ## What is lift and drag coefficients ?

What is lift and drag coefficients ?

Asked on 7th July 2020 in
• 500 views


text:
# Please answer the 4 multiple-choice questions below. don'tneed an explanation thanks!1. What would make more actin in a cell?A. More

###### Question:

Please answer the 4 multiple-choice questions below. don't need an explanation thanks! 1. What would make more actin in a cell? A. More ADP B. Fewer actin molecules binding to ATP molecules C. More GTP D. More proteins that cap the positive end of actin filaments E. More proteins that cap the negative end of actin filaments 2. Blisters in patients that have Bullosa due to disruption of what cell? A. Gap junctions B. Desmosomes C. Adherens junctions D. Tight JOnctions 3. What cytoskeleton element do you think is defective to mutations that cause severe blistering? No, choices, if you know please explain! 3. Where are Shrm3 proteins in epithelial cells. A. Basal B. Apical C. APical- lateral D. BAso - lateral 4. What do both Actin building and microtubule building have in common? I. Both are catalyzed by tubulin dimers II. Both need GTP to form polymers III. Polymers will only form on positive ends IV. DePolymers will only form on negative ends A. I B. III C. I & II D. I &IV E. I, II, III & IV 5.

#### Similar Solved Questions

##### (6) What is the power dissipated by Rz immediately after the switch is flipped to 6? Explain , using this, why a fash requires small value lor Rz-(c) Say C = 12 pF, and Rz = 0.21 0. How long will it take for the capacitor to discharge 90% of its starting charge?
(6) What is the power dissipated by Rz immediately after the switch is flipped to 6? Explain , using this, why a fash requires small value lor Rz- (c) Say C = 12 pF, and Rz = 0.21 0. How long will it take for the capacitor to discharge 90% of its starting charge?...
##### 5. A new shopping mall is considering setting up an information desk manned by one employee....
5. A new shopping mall is considering setting up an information desk manned by one employee. Based upon information obtained from similar information desks, it is believed that people will arrive at the desk at a rate of 20 per hour. It takes an average of 2 minutes to answer a question. It is assum...
##### The reaction A + B 5 C occurs by a two-step mechanism: If the first step occurs at a rate of 10 mmol L-1s-1 and the second step occurs at a rate of 20 mmol L" AS 1,what is the rate by which C is produced?10 mmol L-15-120 mmol L-1s-115 mmol L-ls-130 mmol L-15-1
The reaction A + B 5 C occurs by a two-step mechanism: If the first step occurs at a rate of 10 mmol L-1s-1 and the second step occurs at a rate of 20 mmol L" AS 1,what is the rate by which C is produced? 10 mmol L-15-1 20 mmol L-1s-1 15 mmol L-ls-1 30 mmol L-15-1...
##### Ways to improve the ACA without repealing or replacing it
Ways to improve the ACA without repealing or replacing it...
##### P(x @) 42 122 P( @z p(x 02 121 - A1 P( @n
p(x @) 42 122 P( @z p(x 02 121 - A1 P( @n...
##### Find vector with the magnitude given that satisfics the glven conditions. (8 sin(t) , cos(t), 4), Ilull and have opposite dlrections for any where 650 [email protected] numbcr:
Find vector with the magnitude given that satisfics the glven conditions. (8 sin(t) , cos(t), 4), Ilull and have opposite dlrections for any where 650 [email protected] numbcr:...
##### Q7: HOMEWORK 10 kg floating piston 4.0 cm- In the shown figure (poil-900 kg/m3) A. How...
Q7: HOMEWORK 10 kg floating piston 4.0 cm- In the shown figure (poil-900 kg/m3) A. How much force does the fluid exert on the end of the 100 cm cylinder at A? 20 cm B. How much force does the fluid exert on the end of the cylinder at B? Oil60 cm...
##### Requlred Information Exercise 7-20A Calculate impairment loss (L07-8) [The following information applies to the questions displayed...
Requlred Information Exercise 7-20A Calculate impairment loss (L07-8) [The following information applies to the questions displayed below.] Midwest Services, Inc., operates several restaurant chains throughout the Midwest. One restaurant chain has experienced sharply declining profits. The company&...
##### 34 Solve an 1 the expression ,hioaiue 1 Buisn problem as the L
34 Solve an 1 the expression ,hioaiue 1 Buisn problem as the L...
##### X has a normal distribution with the given mean and standard deviation. Find the indicated probability....
X has a normal distribution with the given mean and standard deviation. Find the indicated probability. (Round your answer to four decimal places.) μ = 42, σ = 20, find P(35 ≤ X ≤ 50)...
##### Ll XY~ U,n be inderendent renoom virie sblez, Lallle E(xi XY].
Ll XY~ U,n be inderendent renoom virie sblez, Lallle E(xi XY]....
##### Part 2 (Row-reduction in countably-infinite dimension) Let V denote the vertor space of polynomials (of all degrees). Recall that V is a" infinite-dlimeusional vector spilce but Mas (Outable Dasis. Consider T Hom(VV defined 5T(p()) 5p () + IOp(2.1. Write T A5 AH 0 00 Matrix; in the standard basis 1,/,73.ol V, 00 MITIX , in the basis 1,/ +46 + 1)2, (+1)' of V2.22_ Write T AS23- Finl the keruel o T That is. Fivel aIl polyuomials tnt sntisly / () 2p (Hint; Evcn though comtains pwlynomia
Part 2 (Row-reduction in countably-infinite dimension) Let V denote the vertor space of polynomials (of all degrees). Recall that V is a" infinite-dlimeusional vector spilce but Mas (Outable Dasis. Consider T Hom(VV defined 5 T(p()) 5p () + IOp( 2.1. Write T A5 AH 0 00 Matrix; in the standard...
##### Question 63 I am most likely to have Production Strategy a Production Strategy and have in...
Question 63 I am most likely to have Production Strategy a Production Strategy and have in a Shortages, Level, overtime, Level Inventory. Chase, overtime, Level Shortages, Chase, Inventory. Level Inventory, Level, overtime. Chase...
##### 26-29 A real estate company is analyzing the selling prices of residential homes in a given community: 140 homes that have been solved in the past month are randomly selected and their 'selling prices are recorded: The statistician working on the project has stated that in order to perform various statistical tests, the data must be distributed according to normal distribution_ order to determine whether the selling prices of homes included in the random sample are normally distributed, the
26-29 A real estate company is analyzing the selling prices of residential homes in a given community: 140 homes that have been solved in the past month are randomly selected and their 'selling prices are recorded: The statistician working on the project has stated that in order to perform vari...
##### When diagonalizing the matrix A = [~2 1 we get A = PDP-I Then P =? and D =?
When diagonalizing the matrix A = [~2 1 we get A = PDP-I Then P =? and D =?...
##### 3rad/s [CW] and 1- Find the acceleration of AB, Ac, Ad, Assume W2 az = last...
3rad/s [CW] and 1- Find the acceleration of AB, Ac, Ad, Assume W2 az = last digit of your student ID rad/s? [CCW] 1.5 D 4.0 B 02 02 = 150° С 2.0 o...
##### Given a radioactive element R with decay constant In 22 k = 3400 find the half-life of R using the decay function if t is in years_
Given a radioactive element R with decay constant In 22 k = 3400 find the half-life of R using the decay function if t is in years_...
##### Prove that the rings Z_18 and Z_3 x Z_6 are not isomorphic Paragraph Β Ι Ο...
Prove that the rings Z_18 and Z_3 x Z_6 are not isomorphic Paragraph Β Ι Ο ... A ® Exha...
##### 1. Sedoheptulose-7-P is a seven-carbon ketose intermediate in both the Calvin-Benson cycle and the oxidative pentose...
1. Sedoheptulose-7-P is a seven-carbon ketose intermediate in both the Calvin-Benson cycle and the oxidative pentose phosphate cycle. In both cases, the cycles are used to interconvert sugars using aldolases, transaldolases and/or transketolases; that is, in the CB cycle five trioses are converted i...
##### Choose correct answer. no explanation needed QUESTION 10 How do astrophysicists account for neutrino emission from...
choose correct answer. no explanation needed QUESTION 10 How do astrophysicists account for neutrino emission from the Sun? Solar flares create neutrinos with very energetic magnetic fields. Convection releases neutrinos, which random walk through the radiation zone. Fission in the Sun'...
##### Outbreak ol influcnza accurred ir ? nursing harne with 202 (esidents Ouring January and Februnry 60 0f the residents Were diagnosed wltntte AdaStiorxl 20 â‚¬r: dcvcloped Itorn Jnuary 2.31 Tne nemaiting; 30 Eises occurred during: the period en Cse? deve Dord on JunuJiy February [+29 Ut wJs ? JpYeJt : )What / tne incidence Tal InetcortHan riAnserJc.EiplinitieWhst  {he point prevalence ratr 08 imluenzs on [email protected] What & Gariod prrv_hrice {te 0t Inlluenza Iur Jaruny 1
outbreak ol influcnza accurred ir ? nursing harne with 202 (esidents Ouring January and Februnry 60 0f the residents Were diagnosed wltntte AdaStiorxl 20 â‚¬r: dcvcloped Itorn Jnuary 2.31 Tne nemaiting; 30 Eises occurred during: the period en Cse? deve Dord on JunuJiy February [+29 Ut wJs ? JpY...
##### 14 Over the last one hundred years a. long term government bonds have outperformed large company...
14 Over the last one hundred years a. long term government bonds have outperformed large company stocks b long term government bonds have outperformed Treasury bills c interest income plus operating income d Inflation has been higher than long-term government bonds 15 Let's say a company's s...
##### What is the IUPAC name of the following compound? Br OH
What is the IUPAC name of the following compound? Br OH...
##### A solid sphere with a radius of 50.0 cm has a total positive charge of 40.0...
A solid sphere with a radius of 50.0 cm has a total positive charge of 40.0 μC uniformly distributed in its volume. Calculate the magnitude of the electric field 10.0 cm away from the center of the sphere: a 1.8e+008 N/C b 3.2e+004 N/C c 1.44e+010 N/C d 2.880e+005 N/C...
##### The graph = of f6) = Vrais given below:If you use numeric integration t0 determinedx with n = 8, which of the following V+4statements are true?Of all of the methods we have learned, the best approximation of this integral would be given if the left endpoint method is used:b) 0 Ln > K Vx +4c) 0 Rn > Snd) OLn < Rn:
The graph = of f6) = Vra is given below: If you use numeric integration t0 determine dx with n = 8, which of the following V+4 statements are true? Of all of the methods we have learned, the best approximation of this integral would be given if the left endpoint method is used: b) 0 Ln > K Vx +4 ...
##### ACIUJDIU] b: R = K[NO][0z] [HIJIo] c R =k [H*]42 on of cyclobu- 2C,H(g) P3S.6 What is the overall order of the reaction correspon- ding t0 the following rate constants? Kthc change 4. k 1.63 * 10 MI 1074 b: k 1.63 * 10-'M-? what k=[.63 * 10 M-In ,-[ will it take P3S.7 The reaclion rle AS function of initial reactant t0 907 of its ini- pressures WAS investigated for the reaction NO(g) 2 Hz(g) N(e) 2H,O(g).= and the following data Wct Tetn pnessure caln_ obtained: Hefona Consider Aan
ACIUJDIU] b: R = K[NO][0z] [HIJIo] c R =k [H*]42 on of cyclobu- 2C,H(g) P3S.6 What is the overall order of the reaction correspon- ding t0 the following rate constants? Kthc change 4. k 1.63 * 10 MI 1074 b: k 1.63 * 10-'M-? what k=[.63 * 10 M-In ,-[ will it take P3S.7 The reaclion rle AS funct...
##### Use the data provided below to answer the following questions: 0.50 WEIGHTS 0.50 HomeChef PORTFOUO Market...
Use the data provided below to answer the following questions: 0.50 WEIGHTS 0.50 HomeChef PORTFOUO Market Bake Date Year 0.26 0.15 -0.14 -0.15 0.02 -0.18 0.42 0.30 0.47 -0.54 0.37 1 0.07 2 -0.20 0.18 0.15 0.07 -0.28 0.40 0.00 0.22 -0.04 -0.14 0.10 0.26 -0.13 6 0.11 0.17 -0.23 0.30 8 0.30 -0.10 0.04 ...
##### Cuestion 6 Not yet ansiwenedWhich carbocation below is the second most stable?Mlarked cut of 0Flag quexticnSelect one:a, 2d.3
Cuestion 6 Not yet ansiwened Which carbocation below is the second most stable? Mlarked cut of 0 Flag quexticn Select one: a, 2 d.3...
##### The ____________ is the basic unit of contraction. a. osteoblastc. twitchb. sarcomered. myosin filament
The ____________ is the basic unit of contraction. a. osteoblast c. twitch b. sarcomere d. myosin filament...
##### The velocity of an airplane flying Into headwind Is given by V(t) = 30 (25 Determine the position function for 0 sts4, How far does the airplane travel in the first 3 hr? Detormine the posilion funclion for 03(24,mlhr for 05t54 hr; and 9(0) = 50s()=b: In the Irst hr; Ihe alrplane Iravols (Simpllly your answer )mi;
The velocity of an airplane flying Into headwind Is given by V(t) = 30 (25 Determine the position function for 0 sts4, How far does the airplane travel in the first 3 hr? Detormine the posilion funclion for 03(24, mlhr for 05t54 hr; and 9(0) = 50 s()= b: In the Irst hr; Ihe alrplane Iravols (Simplll...


text:
# Expectation of sum of absolute values for correlated normal random variables

Let $$x_1, x_2, \dots, x_{N}$$ i.i.d. random variables $$\sim \mathcal{N}\left(0,\sigma^2_x\right)$$. Further, let $$z\sim \mathcal{N}\left(0,\sigma^2_z\right)$$, $$z$$ is independent from all $$x_i$$.

We build random variables $$y_i=x_i+\gamma z$$. By construction, $$y_i \sim \mathcal{N}\left(0, \sigma^2_x +\gamma^2 \sigma^2_z\right)$$ -- But, $$y_i$$ are not independent anymore.

What is the following expectation: $$\mathbb{E} \sum_i \left| y_i\right|,$$ where $$\left| a\right|$$ is the absolute value of $$a$$?

Expectation operator distributes over the sum, so correlation amongst $$y_i$$ is not important in the calculation: $$\mathbb E\left[\sum_{i=1}^N|y_i|\right]=N\mathbb E[|y_1|]$$
$$y_1\sim\mathcal N(0, \sigma_y^2)$$ where $$\sigma_y^2=\sigma_x^2+\gamma^2\sigma_z^2$$. You can calculate the expected value using the mean entry of Folded Normal distribution by letting $$\mu=0, \sigma^2=\sigma_y^2$$. You can choose to calculate it by yourself as well, since the integral will be trivial.