20 June 2014

On dating

What affects the divorce rate? Two things come to mind: the cost of divorce and match stability. Both nominal (legal fees, etc) and social costs of divorce would affect one's decision to get divorced. Arguably, lower cost is desirable. In general, we would not want people to stay married when both parties wish to leave. But why do people want to get divorced in the first place if they married under mutual agreement? There is probably some sort of information problem. For one, it is difficult to know and understand a person, especially when the person may purposefully act differently to appear more desirable.

Match may break down not only due to violation of individual rationality, but also due to a blocking pair. That is, there is problem of "cheating". Unlike the lower cost of divorce, match instability is quite certainly undesirable. It is costly to get married and then get divorced. More importantly, however, divorce after having children imposes negative externalities (of course, children themselves increase the cost of divorce so the externality is at least partially internalized; the problem isn't so much the act of divorce itself but the effect of poor parental relationships on the children).

Currently in the US and probably in many other countries, the conventional procedure to address this information gap problem is dating. People go through the process of dating to learn about the other person and to determine whether the person is acceptable as a marriage partner.

The problem with dating is that it addresses (at least partly) the individual rationality problem, but it fails to prevent a blocking pair simply because the convention dictates that you date one person at a time. Suppose A and B are dating and C comes along and shows interest in A. A suspects that C might be a better partner than B but of course is not sure. A must make a decision to either break up with B in order to start dating with C or stay with B. Of course, if A decides to break up with B but ends up not liking C, then A's chance to get back with B is slim. Thus the option of dating with (or put differently, learning about) C is highly risky. Thus the current convention discourages A-C match to form even if it blocks A-B.

Hence, rather ironically, the society's harsh punishment toward cheating leads to less stable marriages by preventing agents to explore their options. Since break up is much more costly after the marriage, one has more incentive to "explore" the options after the marriage (if you get caught cheating while dating, break up is certain; if you get caught cheating while married, divorce may or may not happen). Even more ironically, the society likely punishes infidelity to maintain the family structure, in which case "cheating" before marriage would be irrelevant.

In short, the fact that dating with multiple people simultaneously is a taboo likely result in less stable matches (in terms of marriage) which in turn results in more divorces. Since divorce puts higher social cost (notably due to externalities imposed on children) compared to break-ups before marriages, the society would benefit by shifting the equilibrium to one in which fidelity to a single partner while dating isn't asked for.

14 June 2014

Improving browser navigation

TLDR: Let the browsing history be carried over when a link is opened in new tab, so the user can click the back button to, well, go back.

The main navigation tool of any browsers is a back button. My Chrome, for example, only has back, forward, and refresh buttons. And this is for a good reason. An HTML document may contain a hyperlink to another page, but the linked page may not have a hyperlink to the original document. The browser's back button is essentially the only way to go back to the parent page from a child page.

All the modern browsers I know have introduced a major UI change in early 2000's: tabs. Tabs have dramatically lowered the inconvenience of having multiple pages open at the same time; navigating between different tabs is much easier than between windows. Hence, a viable (and probably popular, although I do not have data for this) approach to navigation is following a link by opening a new tab rather than in situ.

This style of navigation in some sense makes back button obsolete. Once you open a child page in a new tab, you can go back to the parent page by clicking the original tab. This is also convenient when you want to visit the child page back again. In particular, if one wants to go back to one of multiple child pages, using tabs is far more convenient than navigating through back and forward buttons.

One major draw back of using tabs to navigate, however, is that one loses track of parent-child relationships. A new tab page has no history; if you open a link in new tab, you cannot go back to the parent page through the back button. The child becomes oblivious of its parent; all tabs are independent of each other.

Suppose I am doing an online research. I open up a search engine (page A) and find few relevant links. I open those pages (B1, B2, B3) in new tabs. Pages B1 and B2 contain links for further readings that may be useful. So from page B1 I open pages C1 and C2 and from page B2 I open D1 and D2, all in new tabs, since I might come back to the old pages later. I finish reading D2, and now I am interested in other types of further readings recommended by B2. So I want to go back to the parent page, but now I am not sure which of 7 other tabs that is.

This type of navigation problem usually gets resolved in trial and error fashion which is obviously not very convenient. Only if that back button on page D2 wasn't grayed out. But wait, it doesn't have to be. There is a simple solution. When a child page is opened in new tab, the parent page can pass its history to the child tab.

When a user reaches a page through a sequence of hyperlinks, the page clearly has a history that might be often relevant for the user. Why should that history be lost just because a page is opened in a new tab?

I am aware that there are browsers/extensions that color the tabs to group the family of pages. This is sometimes helpful, but still it does not give any information on vertical hierarchy (so it would not have helped in the example above). The colored tabs can also be often visually jarring and hence confusing. Simply carrying the history over, on the other hand, is much more natural. There will be no visual changes and the back button will always behave the way the user expects it to.

I doubt that carrying browsing history over to tabs will cause much confusion since it simply adds the ability to "go back" when a link is opened in new tab. I am quite certain that in many occasions it will improve the navigation. So why don't browsers implement it?

21 September 2013

De Méré's Problem

Often cited as the problem that began the theory of probability is the so called chevalier de Méré's problem. Chevalier de Méré was the nickname of Antoine Gombaud, a 17th century French writer. He would be quite upset to know that textbooks today often call him a gambler, because not only that's false, but he disliked gamblers in general. In his letter to his friend Mitton, he writes: "But I confess also that on my part I deplore you who are confined to gambling, longing for nothing but luck, without eyes for anything but this artificial world".

De Méré was a sociable man with some significant presence in the royal court. In fact, he was so sociable that he could befriend a nerd like Pascal. This friendship turned out to be a beneficial one both for them and the rest of the world. De Méré brought Pascal's attention to a couple of interesting probability problems and Pascal proceeded to set up the modern probability theory by solving these problems together with Fermat. De Méré still gets quite a bit of credit for his contribution in asking the right questions (life strategy: befriend smart people and ask them hard questions) and have those problems named after him.

There are two problems called de Méré's problems, but then neither were truly original problems that de Méré came with. In fact, one of the problems is more commonly known as the problem of points and had been around at least couple hundred years by then. The other problem also likely predates de Méré but there is no other good name for it and we exclusively call it de Méré's problem.

De Méré's problem goes like this: how many times do you have to throw a pair of dice so that the chance of throwing a pair of six at least once is greater than one-half?

The problem isn't too difficult to solve for anyone who studied some probability (showing how much we have progressed since then). The chance of throwing a double six at least once is one minus the chance of never throwing a double six. The chance of latter is 35/36, so given the dice are thrown n times, the chance of having at least one double six is 1 - (35/36)n. At n=24, this probability is about 0.4914 and at n=25, it is about 0.5055. So the answer is 25 times.

So why did this problem confuse de Méré? My lecture note says he falsely thought that the chance of getting at least once six in four throws is (1/6) times 4 and consequently computed the probability wrong. Well, it turns out that he wasn't so stupid. He in fact claims that the chance of rolling at least one six is greater than half when a die is rolled four times and correctly gives the odd as 671 to 625. What really troubled de Méré was that this result doesn't add up with the so called Old Gambler's Rule.

Critical value is the least number of trials you need to have least one success at least half the times (essentially the median of geometric random variable). So we can rephrase the problem as finding the critical value of rolling a double six. Suppose an experiment has one in N chance of success and has critical value C, and another experiment has one in M chance of success and has critical value D. Then Old Gambler's Rule states that the ratio of N to M is equal to the ratio of C to D.

According to this rule, since rolling at least one six (which has chance of one in 6) has critical value of 4, rolling at least one double six (which has chance of one in 36) should have the critical value of 24. Of course, as we have shown, this is not true, and de Méré keenly noticed this (supposedly through experience).

So the real problem is not so much about finding the critical value of rolling a double six but finding what's wrong with Old Gambler's Rule. To investigate, let's be little more modern and denote the probability of success as p rather than 1/N. As we have shown, the chance of having at least one success in C trial is 1 - (1 - p)C. Now, consider the problem of finding a real (rather than integer) number x such that 1 - (1 - p)x = 1/2. Formulated this way, there is a unique value x for each value of p, and we can still easily find the critical value by taking the ceiling of x.

Solving for x, we get x = -log(2)/log(1-p). For small value of p, log(1-p) is close to -p, so we can approximate the value of x as log(2)/p. In fact, this is the estimation given by de Moivre in The Doctrine of Chances.

Going back to Old Gambler's Rule, let experiment 1 have the success probability p with critical value equal to the ceiling of x. Similarly, let experiment 2 have the success probability q with critical value equal to the ceiling of y. Then we have the relationship x/y = log(1-q)/log(1-p). If p and q are close to 0, we can give an approximate relationship of x/y = q/p. And finally, letting p = 1/N and q = 1/M, we get x/y = N/M, which looks similar to the Old Gambler's Rule (which stated C/D = N/M).

So we see there is a grain of truth in Old Gambler's Rule, but also why it failed for de Méré. First, the rule approximates log(1+p) as p, but this approximation has large error for large values of p. Secondly, the rule is stated in terms of integers rather than the real numbers, adding another layer of approximation error.

This post relied heavily on Oystein Ore's paper Pascal and the Invention of Probability Theory and Prakash Gorroochurn's book Classic Problems of Probability.

01 August 2013

Revisiting 'Guess My Number'

Introduction

Three years ago, I posted about the 'Guess My Number' game, which involves one player (call her chooser) choosing an integer from 1 to 100 and the other player (call her guesser) trying to guess that number. Whenever the guesser names a number, the chooser tells whether her number is higher or lower than the guess. In that post, I asked whether the bisection method, in which the guesser names the median of the current range of numbers, is her best strategy. This post is a response to that question.

Thinking continuously

As it is often the case, the game is easier to analyze in real numbers rather than in integers. So suppose the chooser can pick any real number in (0,1). The problem with this simplification is that if the chooser's choice as a probability function doesn't have any mass point, then the guesser has zero probability of making the exact right guess. Therefore, we cannot measure the expected value of the number of guesses until the correct guess as we would usually do in the integer case.

One way to get around this problem is to think of how fast the guesser can narrow down the range of which the correct number belongs to. To formalize, let Sn be the search space after n-th guess, where S0 is (0,1). Then we are interested in the average ratio of the length of Sn+1 to the length of Sn given a choice pdf and a guessing strategy. To save some writing, let P[(x,y)] be the probability that the chooser's number lies in between x and y.

Suppose the choice pdf is uniform over (0,1). It is rather trivial to show that bisection search is optimal guessing strategy in this case. Suppose Sn is (a,b) and that the guessed number is x (which of course lies in between a and b). Then the expected length of Sn+1 is (x-a)P[(x-a)|Sn=(a,b)] + (b-x)P[(b-x)|Sn=(a,b)] = ((x - a)^2 + (b - x)^2)/(b-a). Since there is only one critical point and the second derivative is constantly positive, it is easy to find that the solution is x = (a+b)/2. Given this optimal choice, the expected length of Sn+1 is (b-a)/2 or as a ratio to the previous length, 1/2, which is expected from the bisection method. This confirms that bisection search is optimal given uniform pdf.

It remains to ask whether it is optimal for the chooser to pick a number uniformly. The answer follows from the observation that when the guesser uses the bisection method, the expected length of the next search space is always one-half of the current search space length, regardless of the choice pdf. Therefore, no matter what probability distribution the chooser takes, the guesser can guarantee to halve the search space. Hence the uniform distribution, against which the bisection method is the best possible strategy, is optimal for the chooser.

I have shown that chooser picking a number uniformly and the guesser using bisection method forms an equilibrium. I have not shown, however, that this is a unique one. Given that the guesser does not mix her strategies, I believe that this equilibrium is unique. Heuristically, suppose the chooser picks any other distribution. Then at some point the guesser will reach an interval S = (a,b) with the midpoint m = (a+b)/2 such that P[(a,m)|S=(a,b)] does not equal to P[(m,b)|S=(a,b)]. Suppose that probability of lower half is greater than the probability of upper half. Then there is some t < m such that P[(a,t)|S=(a,b)] = P[(t,b)|S=(a,b)] = 1/2. Let the guess be x = (t+m)/2. Then the expected length of the next search space is (x-a)P[(a,x)|S=(a,b)] + (b-x)(1-P[(a,x)|S=(a,b)]) which is less than (b-a)/2 since (x-a) < (b-a)/2 and P[(a,x)|S=(a,b)] > 1/2. Therefore, guessing x performs better than guessing m and thus the bisection method fails to be the best response to a non-uniform distribution.

Enter epsilon

Another way of getting around the problem of zero-probability of making the correct guess is to allow some range of error, ε. Instead of requiring the guesser to make the precisely correct guess, we allow her to guess within the epsilon neighborhood of the chooser's number. In other words, given the choice number c, the guess x is correct if x is in between c-ε and c+ε where ε > 0. This time, we can consider the expected number of guesses until the guess hits the target region.

Again, let us start the analysis by making the choice pdf uniform. Given uniform distribution and the search space S = (a,b), the probability of hitting the correct guess, as long as the guess is within (a+ε,b-ε), is 2ε/(b-a). Of course, guessing outside of that region only reduces the probability of the correct guess. Note that due to the uniformity, the probability does not depend on the actual guess but only on the length of the search space. Therefore, the problem is essentially identical to the continuous case in which the guesser tries to minimize the search space length and hence the guesser's best response is again the bisection method.

The problem becomes more complex, however, when we consider the chooser's strategy. If the chooser knows that the guesser will use the bisection method, then she can easily choose the number that will take the largest number of guesses. For example, suppose the initial search space is (0, 10) and epsilon is 1. If the guesser uses bisection, then a number in (4, 6) will be guessed in single turn, a number in (1, 3) or (7, 9) will be guessed in two turns, and a number outside of those regions (ie. the union of (0,1], [3,4], [6,7], and [9,10)) will be guessed in three turns. Assuming uniform choice pdf, the expected number of turns to within-epsilon guess is 1(0.2) + 2(0.4) + 3(0.4) = 2.2. If the chooser knows that the guesser is using bisection, however, then she can choose a number from the 3-turn region, in which case the expected number of turns becomes 3.

More generally, the chooser can force the greatest number of guesses by picking a number from the region which is found by consecutively taking out the middle 2ε-intervals. Given S0, we take out (m-ε,m+ε), where m is the median of S. Then S1 consists of two disjoint intervals so we take out 2ε regions from each of the two intervals. Then S2 consists of four disjoint intervals and from each we take 2ε intervals to get eight disjoint intervals and so forth. We repeat this process until the remaining intervals are of size less than 2ε. (The process is somewhat similar to the way the Cantor set is constructed) If the chooser picks a number from these intervals, the guesser will take the greatest number of guesses the bisection method will take. More precisely, given the initial search space of size ℓ and the tolerance ε, the greatest number of guesses the bisection method will take is the smallest integer n such that 2ε(1+2+22+⋯+2n) ≥ ℓ. Using geometric series formula, we can write n = ceiling(log2(ℓ/(2ε) + 1)).

We have found the best response of the chooser to the guesser's bisection method. Now, knowing that chooser is choosing a number uniformly from the worst-case region, can the guesser do better than bisection? The answer is yes. In the above example, in which the worst case region consists of (0,1], [3,4], [6,7], and [9,10), the bisection search takes 3 turns. However, if the guesser picks 6.5 first and then 3.5 if the guess is too high, then the expected number of turns until the correct guess is 2, which is not only lower than 3 but also lower than 2.2, the expected performance of bisection in case of uniform distribution over (0, 10). Thus the guesser can do better than bisection when the chooser picks from the worst-case region.

Back to the discrete

Note that the worse-case region consists of 2n-1 discrete intervals (where n is the number of guesses as found above) of size less than 2ε, distributed evenly across the initial search space with the distance between each being exactly 2ε. When the chooser picks a number from this set of intervals, the game essentially transforms into the original 'Guess My Number' game, where the choice set consists of integers rather than real numbers. The above example is essentially identical to guessing from {1,2,3,4}, where (0,1] maps to 1, [3,4] maps to 2, and so forth. Under this isomorphism, the original bisection method is equivalent to initially guessing 2.5, which is clearly a poor choice compared to picking either 2 or 3 as the first guess (which has positive probability of being the correct guess and gives better or same information if incorrect as guessing 2.5).

Now that we have reduced the chooser's pick from the worst-case region to the integer guess problem, what is the optimal strategy for the guesser? Assuming uniform choice distribution, the bisection method is still optimal. The guesser only have to make a slight modification by choosing the nearest integer when the mid value is non-integer. That this modified bisection is optimal follows directly from the real number analogue and it is quite easy to see that it does not matter in terms of expected number of turns, given uniform choice distribution, whether the guesser rounds the mid-value upward or downward.

But once again, the chooser does not have to pick uniformly. Since the guesser responds to a uniform pick by bisection, the chooser can again pick the worst-case integers. But the guesser can respond to this choice by applying bisection on the worst-case integers, and this process can repeat until only the end points remain as the worst-case integers.

For example, if the search space is integers from 1 to 7, then the bisection method will choose 4, then 2 or 6. The remaining "regions" of {1,3,5,7} would require 3 guesses and thus the chooser would pick one of those four if the guesser is using bisection. But the process doesn't stop here. If the guesser knows that the chooser knows that the guess is using bisection so that the chooser is picking from {1,3,5,7}, then the guesser can apply bisection method on this subset and start the guess with 3 or 5. The chooser can again respond to this and reduce its choice set further down to {1,7}. The guesser can respond to this by initially guessing 1, and then 7 if incorrect. But if guesser takes this strategy, then the chooser can simply use uniform distribution, against which the end-point guesses are far from optimal.

To approach this problem more formally, let us consider the simplest case in which the initial search space is {1,2,3}. The chooser has two strategies: (A) choose any one of the numbers with 1/3 chance; (B) choose 1 or 3 with 1/2 chance each. The guesser also has two strategies: (a) guess 2 first, and (b) guess 1 or 3 first, and 2 last (note that guessing 2 second is dominated). The expected number of guesses with each strategy pair is summarized in the following table:

Guesser
Chooser
a (bisection)
b (end points)
A (uniform)
5/3
2
B (extreme)
2
3/2

It is easy to check that there is no pure Nash equilibrium in this game. Thanks to Nash, we know there must exist a mixed equilibrium and simple algebra shows that (0.6, 0.4) is an equilibrium strategy for both players (that is, 60% A and 40% B for the chooser and 60% a and 40% b for the guesser). Of course, the "mixed strategy" of chooser can be summarized as a distribution of 0.4, 0.2, and 0.4 for picking 1, 2, and 3, respectively. Thus, the equilibrium can be summarized as the chooser picking a number with the distribution (0.4, 0.2, 0.4) and the guesser guessing 2 first 60% of the time and guessing 2 last 40% of the time. At this equilibrium, the expected number of guesses is 9/5.

Conclusion

The next natural step would be to consider the case in which the initial search space is {1,⋯,n} for an arbitrary n. The generalization seems to be nontrivial so the analysis will have to wait until next time. I think I have enough materials in this post, however, to conclude that the number guessing game is probably not as trivial as it may appear at first. I have shown that in the case of simply reducing the search space, the bisection method is the best strategy against the uniform distribution, which is also the best the chooser can do. When we introduce some tolerance such that the guess can be "correct", we found that the best response to the bisection method quickly brought down the game into the discrete case. With discrete search space, the problem becomes a bit like a convoluted rock-scissor-paper. The choose, in the equilibrium, picks a number non-uniformly, against which the guesser mixes her strategies.

01 November 2012

On square roots of non-perfect-squares being irrational

I started reading baby Rudin for my commute recently and was intrigued by the fact that he proves square root of 2 is irrational then gives as an exercise to prove square root of 12 is irrational. Well, why not just prove that a square root of any non-perfect-square is irrational?

I must admit I couldn't finish the proof in my head on the way to work. It took the return trip to convince myself that I had a proof. So the problem is not as trivial as it seems after all.

Let N be a non-perfect-square number. Suppose there exist a rational number n/m such that (n/m)2 = N. In particular, such a rational number can be expressed in reduced terms so that gcd(n,m) = 1, so suppose that too. Let's start by noting that since N is not a perfect square, its prime factorization must have at least one prime number whose power is odd. Let this prime number be p, so that N = pkq for some odd integer k and some integer q whose prime factorization does not have p.

That means (n/m)2 = pkq, or equivalently, n2 = pkqm2. Thus pk divides n2. This implies pk divides n, since the set of integers is a unique factorization domain (if the prime factorization of n had j≠k as the power for p, then the prime factorization of n2 would have 2j as the power for p, but k is odd). So we can write n = pkr for some integer r, and n2 = p2kr2 = pkqm2. Therefore, pkr2 = qm2.

Remember that q was the prime factorization of N sans pk. So pk must divide m2. Again this implies pk divides m, but this contradicts our assumption gcd(n,m) = 1.

28 October 2012

On high frequency trading

I have complained to my coworker a few times about how I don't think high frequency trading is socially efficient. The coworker didn't really empathize as he saw the benefit of additional liquidity and I didn't really have a strong rationale behind my complaints. I have been thinking more about this issue lately and I think now I have some arguments to support my feeling.

The inefficiency is that trading firms spend millions of dollars to reduce latency at the unit of milliseconds. This is a natural consequence of the nature of high frequency trading competition, just as price competition is a natural consequence of free market. When a supplier in free market reduces the price of its products, its loss from the competition transfers directly to the consumers and in fact the perfect competition that drives the price down to the marginal cost exhausts all mutually beneficial trades to reach a Pareto optimum. On the other hand, the cost incurred from latency competition does not benefit anyone, except for very marginal increase in liquidity (the real social benefit of HFT is liquidity in terms of ask-bid spread, not in latency). In short, all those millions of dollars spent by trading firms to cut down the latency is deadweight loss to the society. And since the latency can never reach a true zero, the arms race can continue on and on. My guess is that at this very moment highly scarce human capital is spent on researching for reducing the trade latency.

I should mention that this is the same kind of social cost incurred by education signalling that I commented on last year. More precisely, it is a social cost of type of competition that has no counter party benefiting from the cost of competition. This type of competition is of course nothing but a form of Prisoner's dilemma, where the player reaps a huge benefit as long as he spends a little more than everyone else. The unique Nash equilibrium in this case would be that everyone spends as much as the benefit which is the worst social outcome.

I can't think of any way to solve this problem. Setting some minimum latency would be an obvious solution but the cost of enforcing it would well exceed the benefit. An easier rule to enforce is no high frequency trading at all. Not to say that HFT is without its benefits, but perhaps it deserves a cost-benefit analysis.

06 October 2012

On patent

The recent court battle between Apple and Samsung has stirred the economics community a little to discuss about the efficiency of patent law. Becker and Posner both show concern that the current patent system is excessive. Becker cites Arnold Plant (1934) who advocated the elimination of patent system, agreeing that Plant erred in the right direction. Still, Becker finds patent system still necessary, writing: Although ending the patent system is a clean solution to all the problems induced by modern patenting, it clearly is not desirable given the importance of industries like the pharmaceutical industry. Since this industry spends on average hundreds of millions of dollars bringing to market a successful drug, pharmaceutical companies would not invest such large sums without the protection of patents (or without other benefits).

And today, I came across an article by Jordan Weissman that cites a working paper by Boldrin and Levine that argues for abolishing the patent system entirely: the best solution is to abolish patents entirely through strong constitutional measures and to find other legislative instruments, less open to lobbying and rent-seeking, to foster innovation whenever there is clear evidence that laissez-faire under-supplies it. The base of the bold argument is that, although well-designed patent system would indeed spur innovations, such system cannot occur with the current political structure. This part of the argument (part 3) feels rather weak at the moment, but that is not unexpected from a working paper.

The paper reminded me of an article by Steven Johnson in Wired magazine (October 2012, "Inventors' Gold"). Focusing primarily on pharmaceutical industry, Johnson argues that the government should offer lump-sum payouts instead of granting patents. The benefit of this alternative is that it eliminates the externality of patent monopoly while still providing incentive for innovation (the lump-sum payment, or the prize, would constitute the "other benefits" Becker mentions). It further solves Plant's concern that, as Becker summarizes, patents distort innovations in favor of goods and processes that can be patented and away from innovations that cannot be patented. In similar vein, Johnson argues that the current patent system does not allow innovations in some of the most needed drugs, such as those for tropical disease.

The last point, of course, is arguable and is in fact one down side of lump sum prize compared to patent. The burden of measuring the value of innovation lies on the government with the lump sum prize, while it lies on the innovators with patent system. As we know, government has less incentive to make accurate estimate. Furthermore, the cost of wrong estimation transfers from the innovator to the taxpayers with the lump sum prize, which may be socially undesirable. Still, I find the alternative of lump sum prize quite attractive over the current patent system.

28 September 2012

Homogeneous production and average cost

I have discussed before that constant returns to scale (CRS) function with a single factor is of the form F(x) = cx where c is a constant. In this post, I wanted to show that if the two−factor production function has CRS, then the average cost is independent of the output level. Then I decided that such a result is too boring to deserve a post, so I am going to discuss the relationship between homogeneity of production function and average cost in full generality, following Sandmo (1970).

A function F: Rn → R is homogeneous of degree k if akF(x) = F(ax) for all a > 0 and x in Rn. A production function has constant returns to scale if it is homogeneous of degree 1. It has increasing returns to scale if homogeneous of degree k > 1, and decreasing returns to scale if homogeneous of degree k < 1. These properties can be defined locally (that is, find k as a function of x) by taking the derivative of the identity equation above with respect to a and then solving for k (assuming F is differentiable): kak−1F(x) = Σ Fixi and since ak−1F(x) = F(ax)/a, we get k = aΣ (Fixi/F(ax)). Evaluating at a = 1, k = Σ (Fixi/F(x)).

Assume perfect competition in factor markets so that the factor prices are exogenously determined. Let ri be the price of factor i and let r be the vector of prices. The total cost is then Σ rixi. For fixed output level Q, the firm is cost minimizing with regard to x subject to its production function F(x) = Q. The Lagrangian is L = Σ rixi − λ(F(x) − Q) and the first order conditions are ri − λFi = 0 for i = 1,..., n and F(x) − Q = 0. These n+1 equations yield the optimal x* as a function of r and Q and we can find the optimal cost C as a function of r and Q: C(r,Q) = Σ rixi*.

While we are talking about cost function, let's mention that the Lagrange multiplier in cost minimization problem can be interpreted as the marginal cost. The derivative of this minimum cost function with regard to Q then is the marginal cost: dC/dQ = Σ ri(dxi*/dQ). By the first order conditions, ri = λFi. Totally differentiating F(x) = Q condition, we get Σ Fi(dxi*/dQ) = 1. Thus, λ = dC/dQ.

Going back to the average cost problem, let A(r,Q) = C(r,Q)/Q be the average cost. To show the behavior of average cost as Q varies, take dA/dQ = Q−2(dC/dQ × Q − C). Thus the direction of average cost in Q depends on the sign of dC/dQ × Q − C or dC/dQ − C/Q. We showed C = Σ rixi = λΣ Fixi and λ = dC/dQ. By the constraint, Q = F(x). Thus dC/dQ − C/Q = λ(1 − Σ (Fixi/F(x))). But we have also shown that k = Σ (Fixi/F(x)). Therefore, the average cost is increasing in Q if k > 1 (decreasing returns to scale), decreasing in Q if k < 1 (increasing returns to scale), and constant in Q if k = 1 (CRS).

27 September 2012

The Basic Ricardian Model

Given that Ricardian insight of comparative advantage is introduced in the very introductory economics classes and that the model is introduced quite early in the intro microeconomics, one would expect that I should know at least the simple Ricardian model inside out. Well, sadly this is not the case; I find going over the model in detail surprisingly nontrivial. In this post I am going to outline the basic Ricardian trade model.

Set Up

In the simple Ricardian model, there are two countries, home and foreign. It seems a literature tradition to postfix foreign variables with * so I will follow the tradition. There are two goods, 1 and 2, and single production factor, labor (L). The total labor endowments, L and L*, are exogenously fixed (immobile across countries). Within each country, labor is perfectly mobile between the industries for good 1 and 2 (L1 + L2 = L).

The production function has constant returns to scale with marginal product of labor equal to ai at home and ai* for i = 1, 2. In other words, to produce one unit of good 1 at home, it takes 1/a1 units of labor, etc. As discussed earlier, CRS with single factor implies that the production function is linear: Qi(L) = aiL.

At this point we can find the production-possibility frontier: {(Q1, Q2) s.t. Q1 = a1L1, Q2 = a2L2, and L1 + L2 = L} = {(Q1, Q2) s.t. Q1/a1 + Q2/a2 = L}. Graphed on Q1-Q2 plane, the PPF is a straight line with slope -a2/a1.

Autarky Equilibrium

Let's consider the autarky equilibrium. Let pi denote price in each industry and let p = p1/p2 be the relative price (of good 1). The model assumes perfect competition, so each industry makes zero profit: Πi = piQi - wiLi = 0, where wi denotes the wage for industry i. Solving for the wage, we get wi = piQi/Li = piai.

Suppose consumer preference is such that at any price both goods are demanded. For both goods to be produced, we require w1 = w2, implying p = a2/a1. We cannot determine the exact autarky equilibrium without a specific demand function, but we know it lies on some interior point of the PPF found above.

Trade Equilibrium

Allow the countries to trade with each other. Assume the foreign country has a comparative advantage in good 2. That is, a2/a1 < a2*/a1*, implying that home autarky relative price of good 1 is lower than the foreign's: pa < pa*. To find the equilibrium price with trade, we consider the supply and demand as usual.

The world relative supply (of good 1) is 0 when both countries specialize in good 2. This occurs when the world relative price p is less than both the home and foreign autarky relative prices. On the other hand, both countries specialize in good 1 when p is greater than both of the autarky prices. If the world price lies strictly in between the autarky prices, so that pa < p < pa*, then home specializes in good 1 while the foreign country specializes in good 2. The relative supply in this region is then (La1)/(L*a2*).

There are end points to consider. When p = pa, the home country may produce both goods while the foreign country specializes in good 2, so that the world relative supply is less than or equal to (La1)/(L*a2*). When p = pa*, the foreign country may produce both goods while the home country specializes in good 1, so that the supply is greater than or equal to (La1)/(L*a2*).

Assuming identical and homothetic tastes across the countries so that the relative demand is decreasing in the relative price p, there are three possible cases. The equilibrium price may equal to the home autarky price or the foreign autarky price, or it my lie in between. Let's focus on the last case in which both countries specialize. Consider the new PPF of the home country. Since it specializes in good 1, it has total income of p1a1L. So the new PPF is {(Q1, Q2) s.t. p1Q1 + p2Q2 = p1a1L} = {(Q1, Q2) s.t. Q1/a1 + (1/p)Q2/a1 = L}. Since 1/p < 1/pa = a1/a2, it follows that the old PPF is a proper subset of the new subset (and since we assumed the preference is such that both goods are demanded, the home country is strictly better off). Graphically, the PPF pivots outward centered at (La1, 0) since the slope of the curve is now p > pa. Similarly, for the foreign country which specializes in good 2, the PPF includes the end point (0, L*a2*) but now has the slope of p < pa* so again it pivots outward.

So in the trade equilibrium, both countries are better off than in autarky. The Econ 101 punchline of the Ricardian model: mutually beneficial trade occurs when there exists a comparative advantage and the direction of the comparative advantage determines the specialization and direction of the trade. In particular, even if a country has no absolute advantage in either good, mutually beneficial trade occurs. For example, even if a1 < a1* and a2 < a2*, comparative advantage can lead to a trade (of course, if one country has a comparative advantage in one good, the other country has the advantage in the other good; if there is no comparative advantage, then autarky prices of both countries are the same, so there will be no gain from trading). How can the home country export when it has lower MPL for both goods?

The answer is that the wages are adjusting to the productivity. In the home country (specializing in good 1), the wage level is w = p1a1 and in the foreign country, it is w* = p2a2* > p1a1* since p = p1/p2 < a2*/a1* = pa*. So a1 < a1* implies w < w*.

It is tempting to close the model with such an optimistic and insightful conclusion, but we have not finished examining the model since we have skipped the end point cases. The only thing to note here is that in the case both countries specialize, we can determine the relative output (La1)/(L*a2*) and use this to determine the equilibrium price given the demand (without demand specified, we can only put a bound). In the case only one country fully specializes, we know the price (the autarky price of the other country) but we have to determine the quantity from a specific demand function from the price. The point is, the model is analytically rather cumbersome even at the basic setting.

Thus the post-Ricardian models have focused on expanding the model to allow multiple countries and factors for empirical studies. Indeed, many international trade models seem to be characterized by three parameters: the number of countries, the number of industries, and the number of factors. Other than those, the most important part of Ricardian model would be the technological difference across countries, which allows gain from trade.

25 September 2012

The Envelope Theorem

I learned in school the Kuhn-Tucker conditions and the envelope theorem but I always felt I didn't have a complete understanding of them. One thing confusing about the envelope theorem is that there are different varieties of it, depending on the flavor of the optimization problem. I decided to review envelope theorem today and keep the notes in the blog.

Consider a constrained optimization problem on the function f(x,a) with regard to x subject to a g(x,a) = 0, where x is an n-vector and a is a scalar. Let M(a) be the solution to the problem; that is,

M(a) = maxx f(x,a) s.t. g(x,a) = 0.

The Lagrangian is then L = f(x,a) − λg(x,a), giving n+1 first-order conditions (or, n first-order conditions and m complementary slackness conditions for more general constrained optimization problem with m inequality constraints). These conditions yield the optimizing argument x*(a) and the solution M(a) = f(x*(a), a).

The envelope theorem states that if x*(a) is a C1 function and the usual constraint qualification is satisfied (∇g(x*(a))≠0), then M'(a) = ∂L(x,a)/∂a evaluated at x = x*(a). To put crudely, to differentiate the solution with regard to a parameter (say for comparative statics), one only needs to differentiate the Lagrangian with respect to the parameter and then "plug in" the solution x* rather than explicitly find M(a) and then differentiate it.

The proof for this version of envelope theorem is a straight-forward calculation. Since M(a) = f(x*(a), a), it follows

M'(a) = Σ(∂f/∂xi)(∂xi/∂a) + ∂f/∂a
for i = 1,..., n.

By the first order conditions, ∂f/∂xi = λ∂g/∂xi for each i. It follows

M'(a) = λ Σ(∂g/∂xi)(∂xi/∂a) + ∂f/∂a

Identically, it must be that g(x*(a), a) = 0. Differentiating this equality with respect to a yields Σ(∂g/∂xi)(∂xi/∂a) + ∂g/∂a = 0. So we get

M'(a) = -λ∂g/∂a + ∂f/∂a evaluated at x = x*(a).
But of course, -λ∂g/∂a + ∂f/∂a = ∂L/∂a

The more general case with m inequality constraints have a similar flavor of proof: differentiate the maximum function with respect to the parameter, collect the terms, and then use the first order conditions and complementary slackness conditions to cancel out the terms. The theorem can be further generalized into the case in which the parameter is a k-vector rather than a scalar.

22 August 2012

CRS function with single factor

An assumption of Ricardian model is constant returns to scale production function with single production factor (labor). Therefore, the marginal product of labor (or, in the usual manner of presentation, its inverse, the units of labor required to produce one unit of good) completely describes the production function. This was so intuitively clear that I never bothered to check.

A production function F(x): Rn → R has constant returns to scale if F(ax) = aF(x) for all a > 0, where x is a n-vector and a is a scalar. In other words, it's economists' way of saying degree 1 homogeneous.

The claim is that if n = 1, then F(x) = cx for some real number c. The proof is simple. Suppose F has constant returns to scale, and denote F(1) = c. Then ac = aF(1) = F(a) for all a > 0. F(0) = 0 follows from the observation that F(0) = aF(0) for all a > 0. Finally, since F(1) = -F(-1), it follows -ac = aF(-1) = F(-a) for all a > 0.

Of course, I could have used Euler's theorem which states that F(x) is homogeneous of degree k iff nF(x) = ΣixiFi where Fi is partial derivative of F regard to xi. Thus, single factor CRS function satisfies F(x) = xF'(x). Solving differential equation yields F(x) = cx.

17 August 2012

Circular shift

I am going through the book Algorithms by Sedgewick and Wayne and found this interesting problem:

A string s is a circular rotation of a string t if it matches when the characters are circularly shifted by any number of positions; e.g., ACTGACG is a circular shift of TGACGAC, and vice versa. Detecting this condition is important in the study of genomic sequences. Write a program that checks whether two given strings s and t are circular shifts of one another.

Claim: strings t and s are circular shifts if and only if t and s have the same length and s is a substring of t + t, where + indicates string concatenation.

One direction is easy to show. Suppose t and s are circular shifts. By definition of circular rotation t and s are of the same length. Also by definition, there exist substrings u and v of t such that t = u + v and s = v + u. Therefore, t + t = u + v + u + v = u + s + v, so s is a substring of t + t.

Conversely, suppose t and s are strings of the same length N and that s is a substring of t + t. Thus, there exist substrings u and v such that t + t = u + s + v. Since t + t is of length 2N and s is of length N, u + v is of length N. Suppose u is of length m. Clearly, u is first m letters of t and v is last N - m letters of t. This implies t = u + v. It follows that t + t = u + v + u + v = u + s + v and thus s = v + u.

With the claim, the implementation is simple. In Java:

public static boolean circularshift(String t, String s)
{
  return t.length() == s.length() && (t + t).indexOf(s) != -1;
}

27 May 2012

Any dutch-pay app?

I can't find any smartphone app that does this:

  1. The user takes a photo of a restaurant receipt
  2. The app performs OCR and makes a 3-column table
  3. Column 1 contains the name of the item; column 2 contains the price of the item
  4. For each item, the user inputs a set of ids of people (name, number, etc) on column 3
  5. The app calculates the tax rate based on the total tax
  6. The user inputs either total tips amount or tips percent
  7. The app gives the total amount each person needs to pay including tax and tips

06 February 2012

Efficient Grade Allocation

Economic efficiency is marked by allocation of a good to a person who value the good the most. One mechanism to find who has the highest value is to assign the object to the person who is willing to (and will) pay the most. Yet, not all scarce resource can be sold for money.

Suppose an instructor has given out grades for a class and everyone has already seen their grades. Before she submit the grades, however, the instructor is willing to increase the letter grade of exactly one student. Whose grade should she increase so that it is economically efficient? That is, how can she find the student who value the improved grade the most while minimizing the negative externality?

13 December 2011

On donations

It's the season of charity and donations and I am going to write against donations. Well, not exactly, but I do have some bad things to say about humanity.

The problem with donation is of information. When you buy a product, you own that product. Then you can assess how good the product is and perhaps even share your assessment. Eventually, consumers gain knowledge of the value of these products and companies that fail to produce quality products at competitive price will be driven out of the market.

On the other hand, when someone donates money the benefit is given to whomever the donor wants to help. The donor rarely gets any information to assess the value of his donation; if you give $1000 to UNICEF, what exactly does it do? The answer to such a simple question is rather difficult to have and consequently choosing a charity to make donation is difficult. If you want to improve the well-beings of African children, should you donate to UNICEF, Save the Children, Invisible Children, the Gates Foundation, or Amnesty International? Most likely, same amount of money given to each of these organizations will lead to different results, some improving the life quality of the children more than the others. Yet there is no way for a person to gain this information. Compare this to, for example, buying a TV. The potential buyer will present himself with different options, consider the pros and cons of each of them, and then make the final decision based on the cost-benefit analysis. This process is largely omitted when someone decides to donate to charity as the information is simply unavailable.

I am claiming that this problem arises as the buyers (donors) differ from the consumers (beneficiaries of the charity) but let me go little further. The task of measuring the value of charity program is a difficult one; much more difficult than measuring the value of say a TV. Suppose a charity has fund to spend on helping people in Ethiopia. It can buy lots of food with the money and give it out to people. It can try to assist building infrastructure. It can lend out money to farmers hoping the investment will increase the output. It can raise the awareness as to increase the future fund to help them. It can run a campaign to reduce the US and EU tariffs on sugar, among other agricultural products that Ethiopia produces. Measuring the benefits of these programs is difficult but nonetheless important, since some actions, no matter how well-intended, can do more harms than goods. It is by now well known that foreign aid in simple form of giving out foods foods can hurt the local economy and foster long-term dependency.

Now, the charity organization could spend some of its fund to figure out what would be optimal choice. There is some effort to do this, but we know remarkably little about how effective and efficient various measures of aids are. We need to learn the economy, people, their needs, what works and not, what is sustainable. And before we have learned this, we need to be more careful and avoid doing things that we think will do good. Lives are lost due to this inefficiency.

Let me trace back a little. I don't want to just argue that there is inefficiency in the charity market. I want to argue that this inefficiency is inherent. So let me go back to my old point: the existence of a charity organization does not depend on how successful it provides its intended aid but on how successfully it collects donations. As pointed out earlier, this problem arises because the buyers and consumers are different. But why is this really a problem, if the donors actually care about the well-being of those who are receiving the aid?

To give a dismal answer, this shouldn't be. If we really cared, then we would demand more information. We would demand to see the proofs that they are doing what they claim to be doing and that those actions are theoretically sound and empirically supported. We would demand that charities regularly provide reports on how well or poorly they are doing in terms of meeting their aims. We would demand to see a third party organization that tries to objectively measure the performance of different charity organizations, so that donors can make more informed decision.

Yet we do not, because what we care about is not other people, but our own moral satisfaction. It is disturbing to know that somewhere in the world there are children dying because they don't have food and fresh water. We feel guilty knowing that there are people dying of diseases that can be cured relatively easily with modern medical technology. We are uncomfortable with inequality and being on the better side without trying to help the other side. So the charity organizations provide satisfaction our moral needs by allowing us to donate money for humane purpose. The act of donating itself, rather than the improvement in the well-being of others, satisfies our moral need.

I am getting little too heated, so let me cool down and finish the post. I have argued that the charity market is inefficient, in the sense that the money collected from the donors by the organizations is not used in the optimal way to improve the life quality of the intended beneficiaries. This inefficiency arises because unlike other markets, those who pay for the product differ from those who consume the product. I argued, although admittedly without much evidence, that this problem will at least partially solved if the donors cared more about the actual well-being of the people who they intend to help. I believe that this will lead to organizations that evaluate different charity organizations in an unbiased way and make the information easily accessible. This would provide incentives for the charity organizations to minimize its current inefficiencies.

Edit (15 September 2012): Here is an interesting WSJ article that is somewhat relevant. I don't quite agree with every argument of the article, but I value the insight in the article that observed how charity market is fundamentally different from most other ones and how its efficiency can be improved.

14 November 2011

On grade inflation

Has the US been experiencing a grade inflation? It is a fact that the average grade a student receives has been increasing over the past decades. Yet, this does not suffice to claim that there is a grade 'inflation' since to do so we must assume that the student ability has not changed over time.

First, we must agree on whether grade should be measured relatively or absolutely. In many cases, grades are measured relatively; a student grade often reflects how many standard deviations he is away from the median student of the class. In this case, grade inflation translates to a higher GPA number assigned to the median student. Yet, we would at least like to measure grades absolutely. In other words, grade should reflect the degree to which the student has achieved the course objectives. The relative measure is merely one way to overcome the difficulty of objective absolute grading.

If grades are measured absolutely, then the grade inflation must look not only at the time trend of the average grade, but also at the change in average student achievement. If students are on average learning more efficiently and therefore meet the course objectives to greater degree, then the average grade should increase. It is difficult to find empirical data on the degree student achievement since it is most commonly measured by GPA. There are, however, good reasons to believe that students on average learn better than they did before. The argument comes from two sides.

One side is that the college has become increasingly competitive. A fact: the average acceptance rate to universities is decreasing. There would be many reasons for this: increasing population, increasing returns to education, and decreasing transportation cost which increases the candidate pools by bringing international students. No matter what the reason is, it is undeniable that the selection to the university is becoming increasingly competitive, and therefore, if we believe that admission committee does its job and selects more able students from the candidate pool, then we should believe that the average ability of students is increasing.

On the other side, teaching become more efficient over the past decades. Students today have access to better textbooks, greater resources (much thanks to the Internet), and hopefully better teaching methods (due to slow but existing pedagogical progress), compared to students in the past. We would at very least hope that these improvements help students to learn, in which case an average student would achieve more learning objectives now than in the past.

This argument counters a claim that grade inflation causes students to be more lazy. To the contrary, it is an increase in learning efficiency that causes the seeming grade inflation. The only concern with the inflation is then that GPA may lose its signal value, but then again, that might not be a bad thing.

11 June 2011

On school grades

Surely any teacher would be offended by the signaling theory of education. If people who go to school don’t come out any better, what does that imply about teachers? The theory seems to suggest that their only function is to make it costly for low ability students to go to school. I believe that most teachers strive quite the opposite. They would want to see improvements especially among the low ability students.

So why do schools assign grades to students? Grading serves as a mechanism to distinguish high ability students from low ability ones, so that the school can reward the high grade students and/or punish the low grade students psychologically, financially, or even physically.

If a school’s interest is to improve students’ abilities rather than to make itself a signaling mechanism, then it should abandon the grading system altogether. One could argue that grades can be used as incentives for students to work harder, but if this were to be true, then grades need to be based on marginal improvement. In reality, grades are based on comparison with others’ performances rather than with one’s own past performance. There is reasons to think that this form of grading can provide disincentives to put effort for low ability students.

By signaling mechanisms, schools that are harsher to low ability students are more popular, since attending such schools signal that students have high ability. If a grade-free school was introduced, such school would be less costly for low ability students, attendance to such schools will give bad signals, and thus the school will be driven out of the market.

What should we do, then? Make a collective effort to make schools grade-free. Schools, with the aim of improving students' abilities, can function without giving grades. On the other hand, grading system leads to early sorting processes potentially resulting in discrimination against low-income students (holding abilities constant, students from high-income families can more easily earn higher grade, earning potentially life-long advantage through signaling). Further, valuable resources are being wasted on grading in the sense that those resources can be put into better improving students’ abilities. Students want teachers, not graders.

20 May 2011

On taste-based vs. statistical discrimination

Since in both labor and experimental economics class we are discussing about discrimination, I have been thinking on this topic for a little while.

It seems there is a general sentiment that taste-based discrimination is morally unacceptable, while statistical discrimination to some degree is permissible. A person who offers  lower wage to minority out of his dislike of the minority is contemptible, but who can blame an insurance company that charges different premium based on gender, age, race, etc.?

As usual, I find myself having controversial thoughts. I find taste-based discrimination to be at least in some cases more permissible than statistical one. Why is it wrong to hate, say, women, but acceptable to hate those who hate women? If an employer strongly believe that racism is morally unacceptable and offers lower wages to racists, is he wrong to do so? Surely one is entitled to have opinions and like or dislike certain type of people, whether that taste is based on “truth” or not.

Besides, there is a sense of reciprocity in taste-based discrimination in that the discriminators pay in order to discriminate. On one hand this reveals how discriminatory a person is, but on the other hand it seems more acceptable than essentially selfish behavior of profit-maximizing even when it involves discrimination. The former foregoes his own earnings in order to discriminate; the latter foregoes non-discriminatory behavior in order to earn more.

Furthermore, taste-based discrimination can be mutual in the sense discrimination can occur from either supply or demand side; a white employer can offer lower wage to black employee, but a black employee could demand higher wage from white employer. This mutuality disappears in statistical discrimination since this discrimination arises from asymmetry of information.

The main reason I find statistical discrimination so disturbing is that it seems potentially self-fulfilling in some cases. As a crude example, I think it is plausible to think as follows. Possibly originating from taste-based discrimination, minorities are less productive and thus the status of minority sends a signal to the employers. Statistically discriminating employers will offer lower wage to the minorities. Given lower income level, the minorities cannot invest as much on their children, and thus the second-generation minorities are less productive as well. The signal is thus confirmed and Bayesian-updating employers continue to discriminate.

Taste-based discrimination can disappear with the flow of time, but statistical discrimination will form a cycle if the discriminatory behavior has an averse effect on the relevant characteristics of the discriminated people. I find this kind of discrimination to be the worst.

19 December 2010

On costly monitoring model

What I found to be the most interesting model we studied in macroecon was Williamson’s model of costly monitoring. In the model, some entrepreneurs with high auditing cost do not receive credit from the bank, resulting in a failure of Pareto optimality. Could the government resolve this information problem?

What the government can do that the bank assumedly cannot is that it can “punish” the entrepreneur for lying. The bank in any contract can at most take all the money that the entrepreneur has (and the entrepreneur begins with no capital), while the government can impose additional cost to the entrepreneurs through imprisonment, etc. This allows the government to use mixed strategy; if the additional cost is high enough, the government can select a few random entrepreneurs to audit and still make the expected cost high enough for entrepreneurs to always tell the truth. In this case, the bank can make contract with all entrepreneurs without loss.

Of course, if the government is credibly committed, then the cost of punishment is irrelevant, since all entrepreneurs will be telling the truth and thus the government would not need to actually punish anyone.

How should the government collect its tax to pay for the auditing? I guess the answer is not so obvious since now the bank may use a different contract. This will be for later.

24 October 2010

Week 4 in Review

I wish I didn’t skip week 3 review. Now I don’t remember what I learned that week.

1. Economic Analysis

The problem set was a killer. I had to solve models, find data, graph data, and read articles. It was vey time consuming, but on the other hand it was somewhat enjoyable. The lectures also have become little more interesting as models are less arithmetic and more controversial. We covered social security and public debt, discussed Ricardian equivalence and fiscal multiplier.

2. Game Theory

We finished discussing Bernoulli function and began to talk about mixed strategy equilibrium. I am stating to think that game theory notations are ugly. The lectures have been more or less standard, but I am looking forward to the proof of existence of a Nash equilibrium for any game.

3. Statistics

Finished the chapter on joint distribution and began the one on expected value. Joint distribution was somewhat difficult; I feel I need to review my multivariable calculus. I was introduced to St. Petersburg paradox and realized that gambling contributed quite a lot to human knowledge.

4. Real Analysis

The midterm was the most difficult exam I have done so far. There were three parts to the exam, and I didn’t even get to read the third part. Anyways, finished the chapter on integration.