TITLE: Difference between two sample proportions
QUESTION [1 upvotes]: Just as the difference between two sample means is normally distributed for large samples, so is the difference between two sample proportions. That is, if Y1 and Y2 are independent binomial random variables with parameters (n1, p1) and (n2, p2), respectively, then (Y1/n1) − (Y2/n2) is approximately normally distributed for large values of n1 and n2.
Find E((Y1/n1) − (Y2/n2)) and V((Y1/n1) − (Y2/n2)).
I know that the mean of the sum of two random variables X and Y is the sum of their means and that for independent random variables X and Y, the variance of their sum or difference is the sum of their variances. I'm not sure how to exactly construct the procedure for calculating the expected mean and variance.

REPLY [2 votes]: Actually is like you said it.....
$\hat{p_1}=\frac{Y_1}{n_1}\sim N\left(\ p_1,\frac{p_1(1-p_1)}{n_1}\right)$ and $\hat{p_2}=\frac{Y_2}{n_2}\sim N\left(\ p_2,\frac{p_2(1-p_2)}{n_2}\right)$
By independence the difference between two normal variables is again normal and in this case is:
$\hat{p_1}-\hat{p_2} \sim N \left(\ p_1-p_2,\frac{p_1(1-p_1)}{n_1}+\frac{p_2(1-p_2)}{n_2}\right)$
So the mean is the difference of the means and the variance is the sums of the variances


TITLE: Let $ABCD$ be a convex quadrilateral prove that an inequality holds true
QUESTION [4 upvotes]: I've been trying to do the following problem:
Let $ABCD$ be a convex quadrilateral and points $E$ and $F$ on sides $AB,CD$ such that:
$\frac{AB}{AE}=\frac{CD}{DF}=n$
If $S$ is the area of $AEFD$ show that $\frac{AB*CD+n(n-1)AD^2+n^2*DA*BC}{2n^2}\ge S$

I attempted to solve it in the following way:
$\frac{AB*CD}{2n^2}=\frac{AE*DF}{2}$
$\frac{n^2*DA*BC}{2}=\frac{DA*BC}{2}$
$\frac{n(n-1)AD^2}{2n^2}=\frac{(n-1)AD^2}{2n}$
so we have that $\frac{AB*CD+n(n-1)AD^2+n^2*DA*BC}{2n^2}=\frac{AE*DF}{2}+\frac{DA*BC}{2}+\frac{(n-1)*AD^2}{2n}$
This is as far as I got, I couldn't think of any theorems or how to correlate these results with the area of $S$. Could you please continue my thought pattern and finish it off? Or explain why it can't be solved using my thought pattern and show an alternative approach?

REPLY [1 votes]: Although what you have started to do is correct, use of the given condition $\left(\mathrm{i.e.}\space \frac{AB}{AE}=\frac{DC}{DF}=n\right)$ alone is not going to lead us to the required proof. You have to introduce the area of the quadrilateral $S$ into the picture by bringing certain theorems, inequalities and other observations into play. We start by proving a simple lemma, which we need later. We also assume that $\infty\ge n\ge 1$.
$\underline{\mathrm{1.\space Lemma}}$
$TUVW$ is a convex quadrilateral (see $\mathrm{Fig.\space 1.1}$). Points $X$ and $Y$ divide its sides $TU$ and $VW$ respectively, such that $\frac{TU}{TX}=\frac{WV}{WY}=n$. The following inequality is true for all $n$, while the equality holds only when the two sides $UV$ and $WT$ are parallel to each other.
$$\left(\frac{n-1}{n}\right)WT+\left(\frac{1}{n}\right)UV\ge XY \tag{1}$$
$\underline{\mathrm{1.1.\space Proof}}$
Draw a line parallel to $WT$ through $X$ to meet the diagonal $UW$ at $Z$. This makes $\frac{WU}{WZ}=n$. Now, draw another line, this time parallel to $UV$, through $Y$ to meet the diagonal $UW$ at some point $Z_1$. This gives us $\frac{WU}{WZ_1}=n$. Since $\frac{WU}{WZ_1} = \frac{WU}{WZ}$, the two points $Z_1$ and $Z$ are one and the same.
When we apply the triangle inequality to the triangle $XYZ$, we have $ZX+YZ\gt XY$. If $WT$ is parallel to $UV$, it is obvious that $Z$ lies on $XY$. Therefore, only in this particular instance, we can write $ZX+YZ= XY$. Therefore, in general, it is true that
$$ZX+YZ\ge XY. \tag{2}$$
We know that $ZX= \left(\frac{n-1}{n}\right)WT$ and $YZ=\left(\frac{1}{n}\right)UV$. When we substitute these values in inequality (2), we get,
$$\left(\frac{n-1}{n}\right)WT+\left(\frac{1}{n}\right)UV\ge XY.$$
$\underline{\mathrm{2.\space Ptolemy’s\space Theorem\space and\space Inequality}}$
Consider $\mathrm{Fig.\space 1.2}$. Ptolemy’s theorem states that, for the cyclic quadrilateral shown in that diagram, the sum of products of the two pairs of opposite sides equals the product of its diagonals, i.e. $AC\times BD = AB\times CD + BC\times DA$. However, for a quadrilateral which is not cyclic, Ptolemy’s theorem becomes an inequality, i.e. $AC\times BD \lt AB\times CD + BC\times DA$. Therefore, in general, it is true that,
$$AC\times BD \le AB\times CD + BC\times DA. \tag{3}$$
$\underline{\mathrm{3.\space An\space Area\space Inequality\space for\space Convex\space Quadrilaterals}}$
Consider $\mathrm{Fig.\space 1.3}$. The area $S$ of the quadrilateral shown in that diagram can be expressed as $2S= AC\times BD\sin\left(\phi\right)$, where $\phi$ is the angle between its two diagonals $AC$ and $BD$. For a given pair of diagonals, the left-hand side of this expression has its maximum value, if they are perpendicular to each other, i.e. $\phi=90^o$. Therefore, we can write,
$$S\le \frac{AC\times BD}{2}. \tag{4}$$
$\underline{\mathrm{4.\space Proof\space of\space the\space Inequality}}$

Now, we have all the tools we need to prove the given inequality. Please pay your attention to $\mathrm{Fig.\space 2}$ and also note that we start off by proving a slightly different inequality, i.e.
$$\frac{AB\times CD+n\left(n-1\right)AD^2+nDA\times BC}{2n^2}≥S, \tag{5}$$
in which the last term of the numerator on the left-hand side is not $\color{red}{n^2}DA\times BC$, but $\color{red}{n}DA\times BC$.
First of all, we expand the left-hand side of inequality (5) to to get,
$$\frac{AB\times CD+n\left(n-1\right)AD^2+nDA\times BC}{2n^2}\qquad\qquad =\frac{1}{2}\left[\frac{AB}{n}\times\frac{CD}{n}+AD\left\{\left(\frac{n-1}{n}\right)AD+\frac{1}{n}BC\right\}\right].$$
As exactly as you have done, we too proceed by eliminating $AB$ and $DC$ using the given relations $AB=nAE$ and $CD=nDF$.
$$\frac{AB\times CD+n\left(n-1\right)AD^2+nDA\times BC}{2n^2}\space\quad\qquad =\frac{1}{2}\left[AE\times DF+AD\left\{\left(\frac{n-1}{n}\right)AD+\frac{1}{n}BC\right\}\right]$$
Now, we use the lemma we have proven above to obtain the following inequality.
$$\frac{AB\times CD+n\left(n-1\right)AD^2+nDA\times BC}{2n^2}≥\frac{1}{2}\left(AE\times DF+AD\times EF\right)$$
Next, with the help of Ptolemy’s inequality, we simplify the right-hand side of the above inequality as shown below.
$$\frac{AB\times CD+n\left(n-1\right)AD^2+nDA\times BC}{2n^2}≥\frac{1}{2}AF\times DE$$
Finally, we use the area inequality for quadrilaterals to complete our proof of inequality (5), which is valid for all $\infty\ge n\ge 1$.
$$\frac{AB\times CD+n\left(n-1\right)AD^2+nDA\times BC}{2n^2}≥S $$
As shown below, we can now multiply the last term of the numerator on the left-hand side of inequality (5) by $n$ to obtain the inequality you have stated in your question, because $n\ge 1$, i.e.
$$\frac{AB\times CD+n\left(n-1\right)AD^2+n^2DA\times BC}{2n^2}≥S. \tag{6}$$
Inequality (6) still preserves its validity, however, it becomes weaker than inequality (5).


TITLE: Pack boxes with different size inside a large box
QUESTION [0 upvotes]: Suppose there are 3 sizes of boxes:

10cm x 10cm x 10cm
20cm x 20cm x 20cm
10cm x 15cm x 4cm

and I have boxes of dimensions 20 x a, 10 x c and 30 x b.  How many boxes of 200 x 200 x 100cm do I need to pack them all?

REPLY [1 votes]: $1$ box will be far more than enough! To see this, let's pack even more boxes, let's say a nice even:
$100$ of type $a$: $10*10*10$
$50$ of type $b$: $20*20*20$
$100$ of type $c$: $10*15*4$
Now, the $100$ boxes of type $a$ can be packed in a square of $10$ by $10$ of such boxes, giving you a layer of $100*100*10$
The $50$ boxes of type $b$ can be packed by putting them into two $5x5$ squares, thus giving $2$ layers of $100*100*20$, for a total of $100*100*40$
Finally, the $100$ boxed of type $$c are all smaller in every dimension than those of type $b$, so let's just pack 100 more boxes of type b: if we can do that, we can certainly pack $100$ boxes of type $c$.
Well, if we pack $100$ more boxes of type $b$ the same was as the earlier $50$ boxes, then it would take us an additional $100*100*80$ of space.
So, stack all these layers, and you get $100*100*130$, which easily fits into a single $100*100*200$ box. (indeed, a $100*100*100$ box will be just fine, giving that the boxes of type $c$ can be packed with a height of $4$ instead of $20$, so they would only take up $100*100*16$, for a total of $100*100*66$)
Plenty of space!!