# Midpoint-Convex and Continuous Implies Convex

Given that $$f\left(\frac{x+y}{2}\right)\leqslant \frac{f(x)+f(y)}{2}~,$$ how can I show that $f$ is convex.
Thanks.

Edit: I'm sorry for all the confusion. $f$ is assumed to be continuous on an interval $(a,b)$.

• You can't. At least, not without assuming that $f$ is continuous. – Willie Wong Nov 18 '11 at 15:06
• Lebesgue measurability is enough @WillieWong. This is a theorem by Sierpinski. (If I recall correctly). – Jonas Teuwen Nov 18 '11 at 15:11
• The trick in the continuous case is to set $z = \frac{p}{2^{n + 1}} x + \frac{q}{2^{n + 1}} y$ with $p + q = 2^{n + 1}$ and proceed by induction. – Jonas Teuwen Nov 18 '11 at 15:15
• @Jonas: right. I should have said "... something like '$f$ is continuous' ". The obvious counterexample is, of course, not Lebesgue measurable. Thanks for the correction. – Willie Wong Nov 18 '11 at 17:13
• – Martin Sleziak May 2 '17 at 13:28

Below is the proof of the fact that every midpoint-convex function is rationally convex, which I copied from my older post on a different forum.

If you add the condition that $f$ is continuous, then from rational convexity you will get convexity. (Note that if you are interested only in continuous functions, then it suffices to show the validity of $f(t x + (1-t)y)\le t f(x) + (1-t)f(y)$ for $t=\frac k{2^n}$ as suggested in Jonas' comment. The proof of this fact is a little easier. I've given a little more involved proof, since the relation between midpoint convexity and rational convexity seems to be interesting on its own.)

Maybe I should also mention that midpoint-convex functions are called Jensen convex by some authors.

Note that without some additional conditions on $f$, midpoint convexity does not imply convexity; see this question: Example of a function such that $\varphi\left(\frac{x+y}{2}\right)\leq \frac{\varphi(x)+\varphi(y)}{2}$ but $\varphi$ is not convex

Let $f: \mathbb R\to \mathbb R$ be a midpoint-convex function, i.e. $$f\left(\frac{x+y}2\right) \le \frac{f(x)+f(y)}2$$ for any $x,y \in \mathbb R$.

We will show that then this function fulfills $$f(t x + (1-t)y)\le t f(x) + (1-t)f(y)$$ for any $x,y\in \Bbb R$ and any rational number $t\in\langle0,1\rangle$.

Hint: Cauchy induction: see wikipedia or AoPS or answers to this post.

Proof. It is relatively easy to see that it suffices to show $f([x_1+\dots+x_k]/k)\le [f(x_1)+\dots+f(x_k)]/k$ for any integer $k$ (and any choice of $x_1,\dots,x_k\in \mathbb R$).

The case $k=2^n$ is a straightforward induction.

Now, if $2^{n-1}<k\le 2^n$, then we denote $\overline x=\frac{x_1+\dots+x_k}k$. Now from $$f(\overline x)=f\left(\frac{x_1+\dots+x_k+\overline x+\dots+\overline x}{2^n}\right) \le\frac{f(x_1)+\dots+f(x_k)+(2^n-k)f(\overline x)}{2^n},$$ where $2^n-k$ copies of $\overline x$ are summmed in the middle expression, we get $kf(\overline x) \le f(x_1)+\dots+f(x_k)$ by a simple algebraic manipulation.

The fact that measurability of $f$ is enough for the implication midpoint-convex $\Rightarrow$ convex to hold was mentioned in some of the comments above and in answers to the question I linked. Some references for this fact:

Constantin Niculescu, Lars Erik Persson: Convex functions and their applications, p.60:

H. Blumberg [31] and W. Sierpinski [226] have noted independently that if $f : (a, b) \to \mathbb R$ is measurable and midpoint convex, then $f$ is also continuous (and thus convex). See [212, pp. 220.221] for related results.

[31] H. Blumberg, On convex functions, Trans. Amer. Math. Soc. 20 (1919), 40–44.

[212] A. W. Roberts and D. E. Varberg, Convex Functions, Academic Press, New York and London, 1973.

[226] W. Sierpinski, Sur les fonctions convexes mesurables, Fund. Math. 1 (1920), 125–129.

Marek Kuczma: An introduction to the theory of functional equations and inequalities, p.241. He mentions the book T. Bonnesen and W. Fenchel, Theorie der konvexen Körper, Berlin, 1934 as an additional reference.

• Not to be too much of a whiner, but that "Spoiler" trick is annoying when the point of asking a question here is to get an answer. It's not like accidentally glancing at your text is going to reveal the answer, so if I want to avoid reading it, I avoid reading it. In addition, there is no way to show your text on displays that do not have "mouse-over" - it stays blank on my iPad no matter what I do, for example. There might be fora and questions where it is appropriate, but this doesn't sem to be one of them. – Thomas Andrews Nov 18 '11 at 15:51
• Sorry @Thomas, I've removed it. – Martin Sleziak Nov 18 '11 at 16:01
• @Hi, just double check. When I check the midpoint convexity, I have to show the inequality holds for any $x,y$ right? I can not just pick $x,y$ such that $f(x)=f(y)$, which looks like checking for quasi-concavity. – Bob Oct 7 '16 at 12:29
• @Bob Yes, by definition midpoint convex means that this inequality is true for any $x$, $y$. – Martin Sleziak Oct 7 '16 at 12:49
• @MartinSleziak, I find it is easy for people to make this mistake. Pick $x,y$ such that $f(x)=f(y)$, and once they showed $f(0.5x+0.5y)>f(x)$ they thought they proved concavity, but only got quasi-concavity. We can pick such two points ($x,y$ s.t. $f(x)=f(y)$) wolg for quasi-concavity, but not for concavity. – Bob Oct 7 '16 at 13:31

As was already previously mentioned it is straightforward to see that for a mid point convex function f $$f\left(\frac{x_1+x_2+\ldots+x_{2^n}}{2^n}\right)\leq\frac{1}{2^n}(f(x_1)+f(x_2)+\ldots f(x_{2^n}))$$ By setting $x_i=x$ for $1\leq i\leq m$ and $x_i=y$ for $m+1\leq i\leq 2^n$ where $1\leq m\leq 2^n$ is an integer we now obtain $$f\left(\frac{m}{2^n}x+(1-\frac{m}{2^n})y\right)\leq \frac{m}{2^n}f(x)+(1-\frac{m}{2^n})f(y)$$ Since the set of rational dyadic numbers of the form $\frac{m}{2^n}$ with $m$ and $n$ integers and $1\leq m\leq 2^n$ is dense in $[0,1]$ the proof follows from the continuity of f.

Can you provide any more information about $f$? For example, the property holds for continuous functions $f: I \rightarrow \mathbb{R}$, $I$ being an interval of real numbers. I think this result is due to Jensen [1].

Theorem (Jensen). Let $f: I\rightarrow\mathbb{R}$ be a continuous function. Then $f$ is convex if and only if it is midpoint convex, i.e. for $x,y$ in $I$ we have

$$f\left(\frac{x+y}{2}\right) \leq \frac{f(x)+f(y)}{2}$$

[1] J. L. W. V. Jensen, Sur les fonctions convexes et les inégalités entre les valeurs moyennes, Acta Math., 30 (1906), 175-193.

• Jensen doesn't prove this, per se, in this paper (his definition of "convex" was the modern-day "midpoint-convex"). It's more correct to say that he proved Jensen's Inequality (with arbitrary real weights) for functions which are midpoint convex and continuous. Of course, Jensen's Inequality with two arguments gives the modern definition of convexity. – Robert Wolfe Nov 9 '17 at 20:30

Given a weight lambda, take its binary expansion. Think of what midpoint convexity implies to the inequalities involving the partial sums of this binary expansion. Then the result follows by the continuity of f.

I would like to properly show by induction that if $$m\in\{0,1,2,\ldots,2^{n}-1\}$$ then $$f\left(\frac{m}{2^n}x+\Big(1-\frac{m}{2^k}\Big)y\right)\le \frac{m}{2^n}f(x) +\Big(1-\frac{m}{2^n}\Big)f(y).$$ and then the result will follows by contuinity since $$m=\lfloor2^nt\rfloor \in\{0,1,2,\ldots,2^{n}\} ~~~and~~\frac{\lfloor2^nt\rfloor}{2^n}\to t$$

The initial state $$n = 1$$ is trivial by hypothesis.

Now we assume that for every $$k, whenever $$m\in\{0,1,2,\ldots,2^{k-1}-1\}$$,we have $$f\left(\frac{m}{2^k}x+\Big(1-\frac{m}{2^k}\Big)y\right)\le \frac{m}{2^k}f(x) +\Big(1-\frac{m}{2^k}\Big)f(y). \tag{I}\label{I}$$

we want to prove \eqref{I} for $$k=n$$.

Let $$m \in\{0,1,2,\ldots,2^{n}-1\}$$ then the division by 2 yields $$m =2p +r$$ with $$r\in \{0,1\}$$ \begin{align}X&:=\left(\frac{m}{2^n}x+\Big(1-\frac{m}{2^n}\Big)y\right)= \left(\frac{2p +r}{2^n}x+\Big(1-\frac{2p +r}{2^n}\Big)y\right) \\&= \left(\frac{p }{2^n}x+\frac{p +r}{2^n}x+\Big(1-\frac{p }{2^n}y-\frac{p +r}{2^n}y\Big)y\right) \\&= \frac12 \left(\frac{p }{2^{n-1}}x+\frac{p +r}{2^{n-1}}x+\Big(2-\frac{p }{2^{n-1}}y-\frac{p +r}{2^{n-1}}y\Big)y\right) \\&=\frac12\left(\frac{p }{2^{n-1}}x+ \Big(1-\frac{p }{2^{n-1}}y\Big)\right)+\frac12\left(\frac{p+r }{2^{n-1}}x+ \Big(1-\frac{p +r}{2^{n-1}}y\Big)\right) \\&:= \color{red}{\frac{1}{2}\left(X_1+X_2\right)}\end{align}

On the other hand, since $$r\in \{0,1\}$$ and $$m\in\{0,1,2,\ldots,2^{n}-1\}$$ it is easy to check using parity that $$p,p+1 \in \{0,1,2,\ldots,2^{n-1}-1\}$$ that is $$p+r \in \{0,1,2,\ldots,2^{n-1}-1\}$$

By hypothesis of induction we obtain \begin{align}f(X) &= f\left(\frac{1}{2}\left(X_1+X_2\right)\right)\le \frac12f(X_1) +\frac12f(X_2) \\&= \frac12f\left(\frac{p }{2^{n-1}}x+ \Big(1-\frac{p }{2^{n-1}}y\Big)\right)+\frac12f\left(\frac{p+r }{2^{n-1}}x+ \Big(1-\frac{p +r}{2^{n-1}}y\Big)\right) \\&\le\frac12\left(\frac{p }{2^{n-1}}f(x)+ \Big(1-\frac{p }{2^{n-1}}f(y)\Big)\right)+\frac12\left(\frac{p+r }{2^{n-1}}f(x)+ \Big(1-\frac{p +r}{2^{n-1}}f(y)\Big)\right) \\&= \frac{2p+r}{2^n}f(x) +\Big(1-\frac{2p+r}{2^n}\Big)f(y)\\&= \frac{m}{2^n}f(x) +\Big(1-\frac{m}{2^n}\Big)f(y).\end{align}


An extension of Baire's category theorem

In a topological space, a set is said to be rare if its closure has empty interior, and a set is said to be meager if it is a countable union of rare sets. If meager sets all have empty interior, then the topological space is said to be a Baire space. The following fact is known as Baire's category theorem.

Theorem. Complete metric spaces and locally compact Hausdorff spaces are Baire spaces.

[Zălinescu 2002] provides the following extension of this theorem for complete metric spaces, attributing it to C. Ursescu.

Theorem. ([Zălinescu 2002, Theorem 1.4.5]) Let $$X$$ be a complete metric space, and $$\{S_n\}$$ be a sequence of open sets in $$X$$. Then $$\mathrm{cl}(\cap_{n=1}^\infty S_n)$$ and $$\cap_{n=1}^\infty \mathrm{cl}(S_n)$$ have the same interior.

It is easy to check that a topological space is a Baire space if and only if any countable intersection of dense open sets is still dense in this space. Consequently, the theorem above implies that complete metric spaces are Baire spaces. Thus it is considered as an extension.

Question. Does the extension hold for locally compact Hausdorff spaces?

Update: As pointed out by @Alex Kruckman, the property in Ursescu's theorem is indeed equivalent to the fact that $$X$$ is a Baire space.

Theorem. A topological space is a Baire space if and only if $$\mathrm{cl}(\cap_{n=1}^\infty S_n)$$ and $$\cap_{n=1}^\infty \mathrm{cl}(S_n)$$ have the same interior for any sequence of open sets $$\{S_n\}$$.

Recall that a space is a Baire space if and only if any countable intersection of dense open sets is still dense. The theorem is essentially another way to state that a space is a Baire space if and only if all its open subspaces are Baire spaces.

Combined with Baire's category theorem, this observation by Alex proves the desired theorem. My answer below proves it from scratch, the proof being essentially the same as that of Baire's category theorem for locally compact Hausdorff spaces.

I will accept Alex's answer a few days later if nobody else has anything to add.

Thanks.

This is not really a strengthening of the Baire category theorem - it is equivalent to it. That is, any Baire space (and in particular any compact Hausdorff space) satisfies Ursescu's theorem.

Let's assume $$X$$ is a Baire space. Suppose $$(S_n)_{n\in \mathbb{N}}$$ is a sequence of open sets in $$X$$. We always have $$\text{int}(\text{cl}(\bigcap_{n=1}^\infty S_n))\subseteq \text{int}(\bigcap_{n=1}^\infty \text{cl}(S_n))$$, so it suffices to prove the reverse inclusion. And to do this, it suffices to prove that for any open $$U\subseteq \bigcap_{n=1}^\infty \text{cl}(S_n)$$, we have $$U\subseteq \text{cl}(\bigcap_{n=1}^\infty S_n)$$.

So fix some $$U$$. Note that an open subspace of a Baire space is Baire. [Why? If $$(V_n)_{n\in\mathbb{N}}$$ is a sequence of dense open subsets of $$U$$, then $$(V_n\cup (X\setminus \text{cl}(U)))_{n\in\mathbb{N}}$$ is a sequence of dense open subsets of $$X$$. The intersection of these sets is $$(\bigcap_{n=1}^\infty V_n)\cup (X\setminus \text{cl}(U))$$, and the fact that this is dense in $$X$$ implies that $$(\bigcap_{n=1}^\infty V_n)$$ is dense in $$U$$.]

So defining $$V_n = U\cap S_n$$, we have that each $$V_n$$ is open in $$U$$, and since $$U\subseteq \text{cl}(S_n)$$ for all $$n$$, each $$V_n$$ is dense in $$U$$. Since $$U$$ is Baire, $$\bigcap_{n=1}^\infty V_n$$ is dense in $$U$$, which implies $$U\subseteq \text{cl}(\bigcap_{n=0}^\infty S_n)$$, as was to be shown.

• Thanks, @Alex Kruckman. I modified the question to highlight your observation. In addition, I modified your answer, changing "Zălinescu's theorem" to "Ursescu's theorem", as suggested by [Zălinescu 2002]. Hope this fine with you. Thanks again. – Nuno Nov 15 '20 at 3:12

Here is my attempt to prove it. It is inspired by the proof of [Zălinescu 2002, Theorem 1.4.5] and the classical proof of Baire's theorem for locally compact Hausdorff spaces. Any comments or criticism will be appreciated. Thanks.

Theorem. Let $$X$$ be a locally compact Hausdorff space, and $$\{S_n\}$$ be a sequence of open sets in X. Then $$\mathrm{cl}(\cap_{n=1}^\infty S_n)$$ and $$\cap_{n=1}^\infty \mathrm{cl}(S_n)$$ have the same interior.

proof. It suffices to show that $$\mathrm{int}(\cap_{n=1}^\infty \mathrm{cl}(S_n))\subset \mathrm{cl}(\cap_{n=1}^\infty S_n)$$. To this end, we only need to prove for any given nonempty open set $$U \subset \cap_{n=1}^\infty \mathrm{cl}(S_n)$$ that $$$$\label{eq:usnonempty} U\cap(\cap_{n=1}^\infty S_n) \neq \emptyset.$$$$ In the sequel, we will define a sequence of compact sets $$\{C_n\}_{n=0}^\infty$$ such that $$C_n$$ has nonempty interior and $$$$C_{n+1} \subset C_{n} \subset U\cap(\cap_{k=1}^n S_k) \quad \text{ for each } \quad n \ge 0,$$$$ where $$\cap_{k=1}^0 S_k=X$$. Once this is done, Cantor's Theorem will yield $$$$\label{eq:nestnonempty} \emptyset \;\neq \;\cap_{n=1}^\infty C_n \;\subset\; U\cap (\cap_{n=1}^\infty S_n),$$$$ which gives us what we want.

We define $$\{C_n\}$$ inductively. As $$U$$ is a nonempty open set and $$X$$ is locally compact, we can take a compact set $$C_0\subset U$$ such that $$\mathrm{int}(C_0)\neq \emptyset$$. Assume that $$C_n$$ is already defined for an $$n\ge 0$$ so that $$C_n\subset U\cap(\cap_{k=1}^n S_k)$$ and $$\mathrm{int}(C_n)\neq \emptyset$$. Recalling that $$U\subset\mathrm{cl}(S_{n+1})$$, we have $$\mathrm{int}(C_n)\subset \mathrm{cl}(S_{n+1})$$, which implies that $$\mathrm{int}(C_n) \cap S_{n+1} \neq\emptyset$$. Since $$\mathrm{int}(C_n)\cap S_{n+1}$$ is open, invoking again the local compactness of $$X$$, we can take a compact set $$C_{n+1}\subset \mathrm{int}(C_n) \cap S_{n+1}$$ such that $$\mathrm{int}(C_{n+1})\neq \emptyset$$. Clearly, $$C_{n+1}\subset C_n$$ and $$C_{n+1}\subset C_{n}\cap S_{n+1} \subset U\cap(\cap_{k=1}^{n+1} S_k)$$. This finishes the induction and completes the proof.


Proof that any linear system cannot have exactly 2 solutions.

How would you go about proving that for any system of linear equations (whether all are homogenous or not) can only have either (if this is true):

• One solution
• Infinitely many solutions
• No solutions

I found this a bit difficult to prove (even though its a very fundamental thing about any linear equation). The intuitive geometric explanation is that a line can only intersect at one point, and if it intersects at a later point, it can't be a linear equation, but I don't think this is a convincing proof.

I thought of if you assume that there are two (or more, but I picked two) solutions for some linear system, then for the points in between

Solution Set 1: X1, X2....., Xn
Solution Set 2: X1, X2....., Xn

Then (I think), the points between S1 and S2, must be infinitely many points (and thus infinitely many solutions) such that these points can also satisfy the linear system, which would mean the system has 2 infinite solutions.

However, I don't think this is rigorous enough and nor do I understand completely why its true. Can anyone help in explaining (correcting) and elaborating on the intuition and proof of this?

• "Infinite solutions" is quite incorrect. It can have infinitely many solutions. But in correct use of mathematical terminology, "infinite solutions" means solutions, each one of which is infinite. If you have six solutions, and each is infinite, then those are infinite solutions but not infinitely many solutions. ${}\qquad{}$ – Michael Hardy Sep 16 '15 at 22:09
• Why do you find the visual proof not convincing? – corsiKa Sep 16 '15 at 22:53
• It's worth pointing out that this question has an implicit assumption that the underlying field is infinite. Over a finite field, the assertion is not necessarily true (and we cannot have infinitely many solutions). E.g. over $GF(2)$, the equation $\pmatrix{1&1\\ 0&0}x=0$ has exactly two solutions $x=\pmatrix{0\\ 0}$ and $x=\pmatrix{1\\ 1}$. See also 6005's answer below. – user1551 Sep 17 '15 at 11:35

Suppose that $\vec v$ and $\vec w$ are distinct solutions for the system $A\vec x = \vec b$ so that $A \vec v = A \vec w = \vec b$. Then $\frac{1}{2}(\vec v + \vec w)$ must be distinct from both $\vec v$ and $\vec w$ and must also solve the system since: $$A(\tfrac{1}{2}(\vec v + \vec w)) = \tfrac{1}{2}(A\vec v + A\vec w) = \tfrac{1}{2}(\vec b + \vec b) = \vec b$$ We can then apply the same argument to $\vec v$ and $\frac{1}{2}(\vec v + \vec w)$ in order to get infinitely many distinct solutions.

• Or pick any $\lambda \in (0,1)$ and consider $\lambda \vec{v} + (1 - \lambda) \vec{w}$. Then you get continuum-many solutions right off the bat. – 6005 Sep 16 '15 at 22:10
• You can even choose any real number for $\lambda$. – Aurey Sep 16 '15 at 23:30
• Looking over this again, great way of explaining your argument (deriving infinitely many solutions) – q.Then Sep 17 '15 at 22:29

Your second proof sounds fine. Let's imagine that the system of equations is written as $Ax = b$, where $A$ is the matrix of coefficients, $x$ is the vector of variables we are solving for, and $b$ are the constants. Now assume we have two distinct solutions $x_1$ and $x_2$. Then $rx_1+sx_2$ is also a solution, if $r+s=1$ - just plug it in and use linearity of matrix multiplication.

$$A(rx_1+sx_2) = A(rx_1)+A(sx_2) = rA(x_1)+sA(x_2) = (r+s)b = b$$

We thus have an infinite number of solutions. If you don't like matrices, you can easily just write out each term in the system of equations.

If you want to get some intuition for what is happening, the linear combination $rx_1+sx_2$, where $r+s=1$, is a line that connects the two points. When $r$ is 1 and $s$ is 0, we get point $x_1$. When $s$ is 1 and $r$ is 0, we get point $x_2$. Other combinations of $r$ and $s$ give other points.

You need to be more careful with your first argument, though. In general, when graphing systems of $n$ equations in $n$ unknowns, the equations are not lines, but $(n-1)$-dimensional planes in $n$-dimensional space. So for a system of three equations and three unknowns, for example, we have three planes in three dimensional space. Unless the planes are parallel, the intersection of two planes is a line, and the intersection of a line with a plane is a point. That's the one solution case. If two planes are parallel, they never intersect - no solutions. And finally, if the line/plane overlaps with another line/plane, we get an infinite number of solutions. That's the intuition behind this theorem.

• Thanks for the answer, I'm sure other answers were great as well, but I think you explained it the best (at least the best for me) – q.Then Sep 17 '15 at 2:55

We can represent a linear system in matrix notation as:$A\vec x=\vec v$. Now suppose that we have $A\vec x=\vec v$ and $A\vec y=\vec v$ with $\vec x \ne \vec y$, for $a,b$ with $a+b=1$ we have, by linearity: $A(a\vec x + b\vec y)=aA\vec x +b A \vec y=\vec v$, so we have infinitely many solutions.

In general, in a vector space over a general field $F$, the number of solutions $\vec{x}$ to the system $$A \vec{x} = \vec{w}$$ is either $0$ or $|\ker A|$. (Because if $\vec{x}_0$ satisfies the equation, then the set of solutions is $\vec{x}_0 + \ker A$.) And $|\ker A| = |F|^k$ for some $k \ge 0$.

Assuming the base field $F$ has infinite cardinality $\alpha$ and the vector space is finite-dimensional, it follows that the number of solutions is $0, 1,$ or $\alpha$ (since $|F|^0 = 1$ and $|F|^k = \alpha$ for $k \ge 1$).

• @user1551 yes, thank you. I corrected that and two other minor typos. – 6005 Sep 17 '15 at 15:20


#1

How many positive integers less than $1000$ have the property that the sum of the digits of each such number is divisible by $7$ and the number itself is divisible by $3$?

Note by Vilakshan Gupta
3 years, 1 month ago

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

• Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
• Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
• Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold
- bulleted- list
• bulleted
• list
1. numbered2. list
1. numbered
2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in $$ ... $$ or $ ... $ to ensure proper formatting.
2 \times 3 $2 \times 3$
2^{34} $2^{34}$
a_{i-1} $a_{i-1}$
\frac{2}{3} $\frac{2}{3}$
\sqrt{2} $\sqrt{2}$
\sum_{i=1}^3 $\sum_{i=1}^3$
\sin \theta $\sin \theta$
\boxed{123} $\boxed{123}$

Sort by:

Let's think of a number $abc (0 \leq a, b, c \leq 9)$. $a+b+c \equiv 0 (\mod 3 \text{and} \mod 7)$. Thus, $a+b+c=21$.

$(3, 9, 9) \rightarrow \frac{3!}{2}, (4, 8, 9) \rightarrow 3!, (5, 7, 9) \rightarrow 3!, (5, 8, 8) \rightarrow \frac{3!}{2}, (6, 6, 9) \rightarrow \frac{3!}{2}, (6, 7, 8) \rightarrow 3!, (7, 7, 7)$ $3+6+6+3+3+6+1=28$

Please tell me if there is any error.

- 2 years, 11 months ago

Nice method

- 2 years, 11 months ago

Good one brother

- 2 years, 11 months ago

Your method is quite efficient vis-a-vis mine. The latter involved manual trials with 3 digit integers with integer 1 to 9 at the unit. Thank you

- 1 year, 1 month ago

What ans did you get?

- 3 years, 1 month ago

Hey Aaron. How much are u getting with bonus? With bonus i am getting 12.

- 3 years, 1 month ago

25 is the answer as per me

- 3 years, 1 month ago

No - I get 28 too - I constructed a 0 - 9 by 0 -9 addition table in excel, and then started adding a 3rd digit to any number whose 2 digits had added to 12 or more - though now I think about it, I could just as easiky have srated my list with 399 and continued from there. And it has to be 28 cos it's one starting with3, 2 starting with 4, 3 starting with 5 etc, and 1+2+3+4+5+6+7 = 28

- 3 years, 1 month ago

28

- 3 years, 1 month ago

we just need to find the numbers which add upto 21

- 3 years, 1 month ago

- 3 years, 1 month ago

How mañy have you got right in PRMO - 17?

- 3 years, 1 month ago

@Md Zuhair Is the paper for 9,10,11 and 12 same?

- 3 years, 1 month ago

Yes Sir!

- 3 years, 1 month ago

unfortunately, i will get only 10 questions correct. I did very silly mistakes

- 3 years, 1 month ago

Sir😅 I am getting 10 along with bonus!

- 3 years, 1 month ago

Oh. U mean 8/28 u r getting?

- 3 years, 1 month ago

well, if it is bonus that means 2 questions marks are given extra.If it was been written question deleted then scores would be evaluated out of 28

- 3 years, 1 month ago

Geometry was quite tough and lengthy! Excluding bonus , I'm getting 8

- 3 years, 1 month ago

oh...btw,where do u live (i mean which region)

- 3 years, 1 month ago

Rajasthan..U?

- 3 years, 1 month ago

oh

- 3 years, 1 month ago

So , you are already selected..Great 👍

- 3 years, 1 month ago

- 3 years, 1 month ago

Coz as per cutoff(s) uploaded by Resonance , cutoff in Chandigarh is lower than others ( Rajasthan , Maharashtra , UP , etc) ... That's why!

- 3 years, 1 month ago

According to Resonance , cutoff in Chandigarh is just 4(questions)

- 3 years, 1 month ago

Ya. Thats ridiculous. WB region has always got a higher cutoff...

- 3 years, 1 month ago

i don't think it will be so low

- 3 years, 1 month ago

If that isnt, then wb will be higher and i will surely not qualify

- 3 years, 1 month ago

It's 11 in Rajasthan ! 😅😒

- 3 years, 1 month ago

LetTheFateDecide !!Bye

- 3 years, 1 month ago

which class are u in toshit?

- 3 years, 1 month ago

@Shreyan Chakraborty .. How much?

- 3 years, 1 month ago

JANI NA BAJE HOYECHE

- 3 years, 1 month ago

ANSWER IS 28....HAS A BIJECTION WITH a+b+c=21 WHERE 0<a,b,c<=9........

- 3 years, 1 month ago

Are na na.... I am not telling that. How much are you getting?

- 3 years, 1 month ago

@Shreyan Chakraborty The Hundreds digit can't be 1 or 2..

- 3 years, 1 month ago

yeah hundreds digit cant be 1,2

- 3 years, 1 month ago

@Md Zuhair @Vilakshan Gupta I haven't attempted one of the bonus question. Will I still get marks for it?

- 3 years, 1 month ago

I think the question can be cancelled as how can a person attempt to decinal answers and i had attempted ine. So i dunno.

- 3 years, 1 month ago

Yup.I think so.

- 3 years, 1 month ago

- 3 years, 1 month ago

I believe the answer is 28 integers. The sum of these integers' digits must be divisible by 21, since a number divisible by 3 also has its sum of digits divisible by 3; in addition to the sum of digits divisible by 7. None of the digits can be less 3 since the sum of digits would be less than 21. Possible combinations = 7+6+5+4+3+2+1 = (7+1)+(6+2)+(5+3)+4=3*8+4=28.

- 3 years, 1 month ago

Exactly

- 3 years, 1 month ago

I agree with all that, and I got the same answer, but if I give you 4 digits at random (say 3, 4, 5 and 6) and ask how many numbers you can make out of them, the answer is 432*1 = 24, not 4+3+2+1 = 10. What am I missing?

- 3 years ago

Ah - that's where the 28 comes from - much more mathematical than my just listing and counting them

- 3 years, 1 month ago

Hello, There are 28 postive integers left less than 1000 have the property that the sum of the digits of each such number is divisible by 7 and the number itself is divisible by 3 You can check out for more queries related to the JEE EXAMS from the following compilation

- 3 years ago

Hey I'm getting 8/27 from jharkhand as per the new answer key of hbcse.will I qualify???

- 3 years ago

Lets see....

- 3 years ago

Hey , what does discounted actually refer to?

- 3 years ago

Are the marks gonna be added to everyone's total or the questions will be cancelled (lowering the cutoff)?

- 3 years ago

They will be added to totsl

- 2 years, 11 months ago

The questions will be cancelled

- 3 years ago

@Pokhraj Harshal Ok! Then I'm also getting the same...

- 3 years ago

How much? Without the question?

- 3 years ago

Which region are u from??

- 3 years ago

WB rgion

- 3 years ago

And what about the other participants and their marks from your school. I mean the averages and the highest marks

- 3 years ago

@Pokhraj Harshal Rajasthan region!

- 3 years ago

@Md Zuhair 8

- 3 years ago

O i see....

- 3 years ago

this question came in this year PRMO answer is 28

- 2 years, 11 months ago

its sum is divisibli by 21 using this you can solve

- 2 years, 11 months ago

27

- 2 years, 11 months ago

28

- 2 years, 9 months ago

33

- 2 years, 2 months ago

zuhair tui ki amk jiggesh korchish??

- 3 years, 1 month ago

Accha.. nijer whatsapp number ta de... whatsapp e kotha bolchi

- 3 years, 1 month ago


# Integration - computer problem

#### Yankel

##### Active member
Hello,

I was trying to solve the integral of

sin(x)*cos(x)

using the substitution method, what I did was:

u=sin(x) and that yields du/dx = cos(x) and then du=cos(x)*dx

that comes to an integral of u*du, which is easy u^2 / 2 +C. substituting back gives the final answer

sin(x)^2 / 2

But, when I ran this integral in both Maple and Mathematica, I got this answer:

-cos(x)^2 / 2

Now I tried asking Maple if the two answers are the same, but it failed. I tried checking myself, using the relation sin(x)^2+cos(x)^2=1, and got to the conclusion that they don't. I don't see what I did wrong here...

#### Ackbach

##### Indicium Physicus
Staff member
Technically, you answer was not $\sin^{2}(x)/2$, but $\sin^{2}(x)/2+C.$ Likewise, the computer's answer was not $-\cos^{2}(x)/2$, but $-\cos^{2}(x)/2+C$. Since your two answers differ by a constant (namely, $1$), they are really the same answer from a calculus perspective.

#### Bacterius

##### Well-known member
MHB Math Helper
Technically, you answer was not $\sin^{2}(x)/2$, but $\sin^{2}(x)/2+C.$ Likewise, the computer's answer was not $-\cos^{2}(x)/2$, but $-\cos^{2}(x)/2+C$. Since your two answers differ by a constant (namely, $1$), they are really the same answer from a calculus perspective.
Or more clearly, $C_1$ and $C_2$. This happened to me a while ago, it tends to occur a lot with trigonometric functions because of their periodic identities, so you often end up with very different looking expressions which are in fact equal..

#### Yankel

##### Active member
ah, I wasn't thinking about it....interesting.

well done to both of you ! thanks !

#### topsquark

##### Well-known member
MHB Math Helper
Just to be cheeky about it:
$$\int sin(x)~cos(x) dx = \frac{1}{2} \int 2 sin(x)~cos(x) dx = \frac{1}{2} \int sin(2x)dx$$

After u = 2x:
$$= \int sin(x)~cos(x) dx = \frac{1}{2} \int sin(u) \cdot \frac{1}{2} du$$

$$= -\frac{1}{4} cos(u) + C = -\frac{1}{4} cos(2x) + C$$

and upon using $$cos(2x) = cos^2(x) - sin^2(x)$$
$$\int sin(x)~cos(x) dx = \frac{1}{4} \left ( sin^2(x) - cos^2(x) \right ) + C$$

which contains both your sin and cos terms and is also off by a constant from the other solutions.

-Dan


# Counting integer solutions with conditional restrictions

Consider $x_i$, with $i=1,\ldots, 10$, such that $$5 \leq 3(x_1 + x_2 + x_3 + x_4) +2(x_5 + x_6 + x_7 + x_8 + x_9 + x_{10}) \leq 12\,,$$ where each $x_i$ can be either $0$ or $1$. In addition, each $x_i$ from $i=5$ to $10$ are restricted to be $0$ if some of the $x_i$ from $i=1$ to $4$ are equal to $1$, according to the following diagram:

Each $x_i$ in the bottom line is restricted by two of the $x_i$ in the top line. For example, if $x_1 = x_2 = 0$, then $x_5$ can be either $0$ or $1$, but if $x_1=1$ and/or $x_2 = 1$, then $x_5=0$ necessarily. The problem is to know in how many ways can we satisfy the inequality, subjected to these restrictions, using a method which is easily used for a computer, like generating functions, for example.

The way I'm trying to answer this is the following: if the additional restrictions did not exist, the number of solutions would be obtainable by using the generating function $$(1+x^3)^4 (1+x^2)^6$$ and the solution would be the sum of all coefficients from $x^5$ to $x^{12}$. The restrictions can be incorporated by defining $x^c_i$ such that, in the case of $i=5$ for example, $$x^c_5 = \quad \left\{ \begin{array}{lll} 0, \quad \, \textrm{if} \quad (1-x_1)(1-x_2)=0 \\ \\ x_5, \quad \, \textrm{if} \quad (1-x_1)(1-x_2)=1 \\ \end{array} \right. \,,$$ and so on for the other variables. Using these $x^c_i$ in the inequality, instead of the $x_i$ (for $i=5$ up to $10$), we have $$5 \leq 3(x_1 + x_2 + x_3 + x_4) +2(x^c_5 + x^c_6 + x^c_7 + x^c_8 + x^c_9 + x^c_{10}) \leq 12$$ which in principle should contain all the restricted possibilities. This is where I'm currently stuck, as I don't know how the generating function for this inequality should be built.

• Not the approach you are pursuing, but just building the characteristic function of the set yields a count of 87. – Fabio Somenzi Feb 23 '17 at 18:52
• Thanks for the reply! I'm not sure what you mean by characteristic function of the set though, could you be more specific as how you did it? – GKiu Feb 23 '17 at 20:15
• The characteristic function I referred to is a function of Boolean variables $x_1,\ldots,x_{10}$ that evaluates to true if and only if the constraints are all satisfied. It can be built as the conjunction of characteristic functions for the individual constraints. The incompatibility constraints are simple: for example $\neg x_5 \vee (\neg x_1 \wedge \neg x_2)$. The linear inequalities are a bit more complicated, but not much. Of course, I let the computer take the conjunctions and count the models. – Fabio Somenzi Feb 23 '17 at 21:31
• Although this works, I was looking for an answer in terms of generating functions like @Jeremy Dover suggested, but thank you for the clarification nonetheless. – GKiu Feb 24 '17 at 19:09
• Understood. That's why I posted a comment and not an answer. – Fabio Somenzi Feb 24 '17 at 19:45

This only really works because of the symmetry between the variables $x_1 \ldots x_4$ and $x_5 \ldots x_{10}$, but I think you can build a generating function this way:

If none of the $x_1 \ldots x_4$ are 1, then any of the $x_5 \ldots x_{10}$ can be 0 or 1 freely, so we get the generating function $(1+x^2)^6$ to count these solutions.

If exactly one of the $x_1 \ldots x_4$ is 1, then three of the $x_5 \ldots x_{10}$ must be zero, but the remainder are free, yielding the generating function $4x^3(1+x^2)^3$.

If exactly two of the $x_1 \ldots x_4$ are 1, then five of the $x_5 \ldots x_{10}$ must be zero with only one free, so we get the generating function $6x^6(1+x^2)$.

If three or four of the $x_1 \ldots x_4$ are 1, then all of the $x_5 \ldots x_{10}$ must be zero, so we get the generating function $4x^9+x^{12}$.

We can add all of these up to get the generating function: $$(1+x^2)^6 + 4x^3(1+x^2)^3 + 6x^6(1+x^2) + 4x^9+x^{12}$$ Like @Fabio Somenzi, when I calculate I also find 87 to be the answer.

• Thank you very much for your answer! This is exactly what I was looking for. – GKiu Feb 24 '17 at 19:07


# statistics probability

A bag contains 8 red marbles, 5 white marbles, and 6 blue marbles. You draw 4 marbles out at random, without replacement. Find the following probabilities and round to 4 decimal places.

a. The probability that all the marbles are red is

b. The probability that none of the marbles are red is

1. 👍
2. 👎
3. 👁
1. prob(all 4 red) = (8/19)(7/18)(6/17)(5/16) = 35/1935
or
prob(all red) = C(8,4)/C(19,4) = 70/3876 = 35/1938

Prob(none red) = C(11,4)/C(19,4) = 330/3876 = 55/646
or
prob(none red) = (11/19)(10/18)(9/17)(8/16) = 55/646

1. 👍
2. 👎

## Similar Questions

1. ### Math

A bag contains 6 red marbles, 3 white marbles, and 7 blue marbles. You pick a marble without looking. Find the probability of drawing a white marble. Can someone please explain how I would work this out?

2. ### statistics

A bag contains 7 red marbles, 6 white marbles, and 10 blue marbles. You draw 4 marbles out at random, without replacement. What is the probability that all the marbles are red? What is the probability that exactly two of the

3. ### math

A bag contains 5 red marbles, 6 white marbles, and 8 blue marbles. You draw 5 marbles out at random, without replacement. What is the probability that all the marbles are red? The probability that all the marbles are red is? What

4. ### Math

A bag contains 9 red marbles, 8 white marbles, and 6 blue marbles. You draw 4 marbles out at random, without replacement. What is the probability that all the marbles are red? 1 The probability that all the marbles are red is...?

1. ### math

There are 5 red marbles, 6 blue marbles, e green marbles, and 2 yellow marbles in a bag. What percent or fraction represents the number of blue and green marbles in the bag?

2. ### math

A bag contains 8 red marbles, 5 blue marbles, 8 yellow marbles, and 6 green marbles. What is the probability of choosing a red marble if a single choice is made from the bag? is it 8/27 ?

3. ### Math :)

In a bag of 10 marbles, there are 5 blue marbles, 3 red marbles, and 2 white marbles. Complete the probability distribution table for drawing 1 marble out of the bag. Draw a: Probability Blue marble 5/10 Red marble 3/10 White

4. ### statistics

a bag contains 4 blue marbles,6 red marbles, 10 yellow marbles and 6 green marbles.What is the probability of not drawing a red marble?

1. ### Math

The ratio of white marbles to blue marbles in Connie's bag of marbles is equal to 2:3. There are more than 20 marbles in the bag. What is a possible number of white marbles and blue marbles in the bag?

2. ### Stat

A bag contains 5 red marbles, 9 white marbles, and 5 blue marbles. You draw 4 marbles out at random, without replacement. What is the probability that all the marbles are red?

3. ### Maths

A bag contains marbles of three different colours red, blue , yellow. 2/5 of the marbles are red. The ratio of the number of blue marbles to the number of yellow marbles is 5:7. What fraction of the marbles in the bag is blue?

4. ### Math

Ken had a number of colored marbles in a bag. 1/4 of the marbles were red, 2/3 of the remaining marbles were blue, and the rest were yellow. Given that there were 120 red and yellow marbles altogether, how many marbles were there


## How do I evaluate this log function?

1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

I assume I can't use a calculator obviously.. so I'm quite stuck. The answer is 5, but I have no idea how to get that.

(log23)(log34)(log45) ... (log3132)
 PhysOrg.com science news on PhysOrg.com >> Galaxies fed by funnels of fuel>> The better to see you with: Scientists build record-setting metamaterial flat lens>> Google eyes emerging markets networks
 Recognitions: Homework Help Use the fact that $$\log_b a = \frac{\log_c a}{\log_c b}$$ for any positive, real numbers a, b and c (with c > 1).
 That was a fast response, and a fact that I didn't know. How do I create equations on this forum BTW?

## How do I evaluate this log function?

 Quote by feihong47 That was a fast response, and a fact that I didn't know. How do I create equations on this forum BTW?
You use LaTeX, that is, the [ itex ][ /itex ] -tags (remove the spaces) . There's a guide in the forums somewhere if you're not familiar with it, I'll edit a link to it to this post if I find it. You can also open the "LaTeX Reference" by clicking the Σ in the toolbar.

If you don't have to write anything complicated, you can just use the quick symbols and x2 and x2 buttons in the toolbar. LaTeX looks a lot nicer & it's easier to read, though.

EDIT: Here's the LaTeX guide.

Mentor
 Quote by feihong47 1. The problem statement, all variables and given/known data 2. Relevant equations 3. The attempt at a solution I assume I can't use a calculator obviously.. so I'm quite stuck. The answer is 5, but I have no idea how to get that. (log23)(log34)(log45) ... (log3132)
You could also approach this as follows:

Let $\displaystyle y=(\log_{2}3)\,(\log_{3}4)\,(\log_{4}5)\,\dots\,( \log_{31}32)$

Then, $\displaystyle 2^y=2^{(\,(\log_{2}3)\,(\log_{3}4)\,(\log_{4}5)\, \dots\,( \log_{31}32)\,)}$

By laws of exponents and the definition of a logarithm,

$2^{(\,(\log_{2}3)\,(\log_{3}4)\,(\log_{4}5)\, \dots\,( \log_{31}32)\,)}$
$=\left(2^{(\log_{2}3)}\right)^{(\,(\log_{3}4)\,( \log_{4}5)\, \dots\,( \log_{31}32)\,)}$

$=3^{(\,(\log_{3}4)\,( \log_{4}5)\, \dots\,( \log_{31}32)\,)}$

$=\left(3^{(\log_{3}4)}\right)^{(\,( \log_{4}5)\, \dots\,( \log_{31}32)\,)}$

$=4^{(\,( \log_{4}5)\, \dots\,( \log_{31}32)\,)}$

etc.

$=\left(31^{(\log_{31}32)}\right)$

$=32$
 Recognitions: Gold Member Science Advisor Staff Emeritus So, just in case others misunderstand, $2^y= 32= 2^5$ and therefore, y= 5 as the original poster said.
 Very nice approach. Thanks!


# What is the difference between max and sup?

I am studying KS (Kolmogorov-Sinai) entropy of order q and it can be defined as

$$h_q = \sup_P \left(\lim_{m\to\infty}\left(\frac 1 m H_q(m,ε)\right)\right)$$

Why is it defined as supremum over all possible partitions P and not maximum?

When do people use supremum and when maximum?

-
I am not sure either of the tags fit. I do not know the term "KS entropy" so I cannot suggest a better retag. The essence of "what is $\sup$ and what is $\max$ was answered on this website before. Here is one answer, math.stackexchange.com/questions/18605/… –  Asaf Karagila Jul 27 '11 at 15:55
Based on a quick google search I believe [dynamical-systems] fit well into this question. I (somewhat unwillingly) left [order-theory] since your second question can be generally answered within its confines. As my previous comment suggests, the second answer was indeed answered before (many times as well), I do not vote to close as the first answer may or may not been addressed to in other questions on the site. –  Asaf Karagila Jul 27 '11 at 16:01
@Asaf, KS stands for Kolmogorov-Sinai, I saw that question earlier, but I still don't get when people use sup and when max. It's probably coz I need to spend more time to think over all the answers there. But thanks for the link anyway. Pls feel free to retag. –  oleksii Jul 27 '11 at 16:03
"'Sup" is a hip way of asking "How are you?" –  oosterwal Jul 27 '11 at 20:06
@oleksii: You have received several answers, all are very good in answering the question in the title. None of which answer the question "Why is it defined as supremum over all possible partitions $P$ and not maximum?". While I respect your wish to accept the answer, it would be nice to indicate that you have at least deduced the answer of the seemingly unanswered question from the accepted answer. Otherwise, this has become a duplicate of a question that has been answered here many times before. –  Asaf Karagila Jul 28 '11 at 0:21

If the maximum exists, then the supremum and maximum are the same. However sometimes the maximum does not exist, and there is no maximal element. In this case it still makes sense to talk about a least upper bound.

The classic example is the set of all rationals whose square is less than or equal to $2$. That is the set $$A=\left\{ r\in\mathbb{Q}:\ r^{2}\leq2\right\}.$$

$A$ has no maximal element, however it does have a supremum and $\sup A=\sqrt{2}$.

An even simpler example is the set of all reals that are strictly less than $2$: $$B=\left\{ r\in\mathbb{R}:\ r<2\right\}.$$ This set has no maximum since for any $x\in B$ the element $\frac{x+2}{2}$ satisfies $x<\frac{x+2}{2}<2$. However it is not hard to see that $\sup B=2$.

-
Tnx, this is a nice answer, +1 for easy samples –  oleksii Jul 27 '11 at 16:17

Consider for example the set $X = (0,1)$. Then $$\sup X=1$$ but $\max X$ does not exist.

Generally, for a set $X\subset {\mathbb R}$, we define $x:=\max X$ if $x\in X$ and $$\forall y\in X, y\leq x.$$

We define $x:=\sup X$ if $$\forall y\in X, y\leq x$$ and $$\forall\epsilon>0,\quad\exists y\in X, \quad\text{s.t.}\quad y>x-\epsilon.$$

-
I quite like your first answer, it was very plain and easy to get [for me :)]. Tnx. –  oleksii Jul 27 '11 at 16:15

Supremum need not be attained while maximum is. When maximum exist, maximum=supremum.

-

The set of all negative numbers has a sup, which is 0, but not a max.

0 is the smallest number that no negative number can exceed.

-

A maximum is the largest number WITHIN a set. A sup is a number that BOUNDS a set. A sup may or may not be part of the set itself (0 is not part of the set of negative numbers, but it is a sup because it is the least upper bound). If the sup IS part of the set, it is also the max.

-


# Which is the correct way to calculate the expected value of a shared lottery jackpot?

I want to calculate the expected value of a ticket in a lottery game which gives players a probability $p$ of winning a jackpot prize of $j$ dollars. The total number of tickets in play is $t$.

If every winning ticket gets the full prize amount, the expected value for a ticket is given by $jp$. However, if winners must evenly split the prize in case of multiple winners, then the expected value depends on the number of winners $W$.

The expected number of winners is $tp$. The probability that the number of winners $W$ is $w = 0, 1, 2, \dotsc$, follows a Poisson distribution with the expected number of winners as its parameter:

$$P(W=w) \sim Pois(tp) = \frac{tp^we^{-tp}}{w!}$$

I don't know how to get from there to calculating an accurate expected value for the ticket as a function of the number of tickets in play.

In reading online, I've found two different methods each used by several sources. If I'm following them correctly, then they give different results. My question is 1) which one is correct? 2) what is the error in reasoning (or in my understanding/implementation) in the incorrect method?

## Method 1: Number of Winners

The first method calculates the probability that the number of winners $W$ will be $w = 0, 1, \dotsc, t$, given that there is at least one winner:

$$P(W=w | W>0) = \frac{P(W>0|W=w)P(W=w)}{P(W>0)}$$

Where,

• $P(W>0|W=w)$ is $\left\{ \begin{array}{lr} 0 & : w = 0\\ 1 & : w > 0 \end{array} \right.$
• $P(W=w)$ is the probability of $w$ winners: $\frac{tp^we^{-tp}}{w!}$
• $P(W>0)$ is the probability of more than one winner: $1 - P(W=0)$

So the expected value of the ticket is given by:

$$p\sum_{w=1}^{t} \frac{j}{w}\frac{P(W=w)}{1-P(W=0)}$$

For a numerical example, we'll tabulate the first few values of $P(W=w)$ for a lottery with a 1/34,220 chance of winning \$100,000 jackpot, with 6,000 tickets in play, so$p = 1/34,220; j = 100,000; \text{and } t = 6,000$$$\begin{array}{c|c|c|c|c|} \text{Winners} & \text{Probability} & \text{Conditional Probability} & \text{Share} & \text{Contribution } \\ w & P(W=w) & P(W=w|W>0) & j/w & (j/w)P(W=w|W>0) \\ \hline 0 & 0.839 & 0 & \text{\0} & \text{\0} \\ \hline 1 & 0.147 & 0.913 & \text{\100,000} & \text{\91,300} \\ \hline 2 & 0.013 & 0.081 & \text{\50,000} & \text{\4,050} \\ \hline \end{array}$$ Summing the contribution column and multiplying by$p$gives an expected value of$2.79.

## Method 2: Number of Other Winners

The second method calculates the probability that the number of total winners $W$ is $w = 0, 1, \dotsc, t$, given that our ticket is a winner:

$$P(W=w|Winner) = \frac{P(Winner|W=w)P(W=w)}{P(Winner)}$$

Where,

• $P(Winner)$ is the probability that our ticket is a winner: $p$
• $P(Winner|W=w)$ is the probability that our ticket is a winner given $w$ winning tickets: $w/t$
• $P(W=w)$ is the probability of $w$ winners: $\frac{tp^we^{-tp}}{w!}$

Plugging those figures in shows that $P(W=w|Winner)$ reduces to $P(W=w-1)$:

$$\frac{w}{t}\frac{P(W=w)}{p} = \frac{tp^{w-1}e^{-tp}}{(w-1)!} = P(W=w-1)$$

So the expected value is given by:

$$p\sum_{w=1}^{t}\frac{j}{w}\frac{tp^{w-1}e^{-tp}}{(w-1)!}$$

Using the same lottery numbers as above, the first few values of $w$ are given in the following table.

$$\begin{array}{c|c|c|c|c|} \text{Winners} & \text{Probability} & \text{Conditional Probability} & \text{Share} & \text{Contribution } \\ w & P(W=w) & P(W=w|Winner) & j/w & (j/w)P(W=w|Winner) \\ \hline 0 & 0.839 & 0 & \text{n/a} & \text{\0} \\ \hline 1 & 0.147 & 0.839 & \text{\100,000} & \text{\83,900} \\ \hline 2 & 0.013 & 0.147 & \text{\50,000} & \text{\7,350} \\ \hline \end{array}$$

Summing the contribution column and multiplying by $p$ gives an expected value of $2.67. ### Online Resources Which Use Method 2 Clearly the expected payout for the example lottery above cannot be both \$2.79 and \$2.67, but I'm having a difficult time reasoning my way to the correct method. Any hints will be appreciated! - ## 4 Answers Proof that Methods 2 and 3 are equivalent: Method 3 has a very intuitive appeal as the correct approach when interpreted as someone purchasing$allt$tickets. Now we'll show that Method 2 gives the same result if we use the binomial for the distribution of winning tickets instead of the Poisson. The expected value for Method 2 is: $$p\sum_{w=1}^t\frac jw {t-1 \choose w-1}p^{w-1}(1-p)^{t-w}$$ $$=j \sum_{w=1}^t \frac {(t-1)!}{w!(t-w)!}p^{w}(1-p)^{t-w}$$ $$=\frac jt \sum_{w=1}^t {t \choose w}p^{w}(1-p)^{t-w}$$ $$=\frac jt (1-(1-p)^t )$$ which is also the result for Method 3. If we had started with the Poisson distribution as an approximation to the binomial, then the expected value for Method 2 reduces to $$\frac jt(1-e^{-tp})$$ The Poisson will be a good approximation to the binomial when$t$is large,$p$is small and$tp$is moderate, which holds here. - Method 3: By linearity of expectation, the expected value of one ticket is$\frac{1}{t}$times the expected total value of all the tickets. That expected value is$jP(W>0)=j(1-P(W=0))=j(1-(1-p)^t)$. Thus the expected value of one ticket is $$\frac{j}{t}(1-(1-p)^t))$$ For the numerical values you use, I get \$2.68. I'm not skilled enough at statistics to find the logical flaw in Method 1, but I suspect Method 2 is right (up to rounding).

Followup: it seems that this solution, or a variation, was listed under "resources" supporting the second solution. I didn't notice it on my first read-through due to wall of text.

-
Thank you, vadim. Yeah, I had a link to this answer buried in the resources section, but your mentioning that expectation is linear helped me understand why it is correct without having to actually enumerate and sum the probability of each number of winners. That leaves me very confident that Method 2 is correct. However, I would like to find a good way of explaining why Method 1 is incorrect. –  cristoper Jun 29 '14 at 5:25
I suspect that the problem with Method 1 is that the probability my ticket is a winner is no longer $p$ when we have conditioned on there being exactly $w$ winners. –  vadim123 Jun 29 '14 at 5:34

This is my own summary answer. If somebody has a better way of explaining why the first method in my question goes wrong (and what it does compute, if anything useful), please post an answer!

## Method 1 is incorrect

If $P(Winner)$ is the probability that our ticket is a winner, then as user159813 pointed out, the expected payout from the lottery can be expressed as:

$$\sum_{w=1}^{t} \frac{j}{t} P(Winner \cap W=w)$$

However, the payout calculated by Method 1 is:

$$\sum_{w=1}^t \frac{j}{t} P(W>0 \cap W=w)$$

Which is different because $P(W>0) \ne P(Winner)$. We want $P(W=w)$ given that our ticket won, which is a lesser probability than given that any ticket won.

## Method 2 is correct

As vadim123 points out in his answer, the correctness of Method 2 is confirmed by the nice, closed-form formula derived from the fact that the expected value of a single ticket is the same as the expected value of all tickets divided by $t$:

$$\frac{j}{t}(1-(1-p)^t)$$

## Simulation

I ran a simulation using the same numbers as the example in my question. The mean payout after the 10,000,000th iteration was about \$2.64. After about 5,000,000 iterations, the mean seemed to oscillate about the$2.68 line.

-

There is a problem in Method 1. Letting $Y$ represent amount won and $W$ be number of winners we see that $$E(Y)=\sum_{w=0}^{t}\frac{j}{w}P(Winner\cap W=w)$$

The second method does this correctly by calculating $$P(Winner\cap W=w)=P(W=w|Winner)P(Winner)=P(W=w-1)P(Winner)=P(W=w-1)p$$

as you have above. Now the problem with Method 1 is that it says that $$P(Winner\cap W=w)=P(W=w|W>0)P(Winner)$$ which is not true. I would guess the method this person was going for is actually $$P(Winner\cap W=w)=P(Winner| W=w)P(W=w)$$

-
I don't see where Method 1 says $P(Winner \cap W=w)=P(W=w|W>0)P(Winner)$. However, I do see where it says it equals $P(W=w|W>0)P(W>0)$. And looking at your formulation of the expectation function, it is easier for me to see that Method 1 is wrong because $P(W=w|W>0)P(W>0) \ne P(W=w|Winner)P(Winner)$ –  cristoper Jun 29 '14 at 20:34
And should the index in your sum start at $w=1$ to avoid the divide by zero? $P(Winner \cap W = 0) = 0$ anyway. –  cristoper Jun 29 '14 at 20:47