Saturday, July 6, 2013

Integral of products

I have come up with a way to find continuous products the way an integral finds continuous sums. i.e., by multiplying very  small intervals. The way to find the continuous product of a function is: e^∫[ln f(x)] dx. Input limits a and b into the integral. The ln function is undefined at 0, and a continuous product is 0 at 0, so, if a function crosses 0 between a and b, the continuous product is irrelevant. Negative numbers are a curious case, because if there are an odd number of negative terms, the function is negative, whereas if there are an even number, it is positive. Since we're taking infinitely small intervals, we can't determine whether there are an odd or even number of negative terms. One could argue that this means that there the number must be even, since it's broken up into infinite parts, therefore, the region that it is negative for will also be divisible by 1/(infinity/2). If one assumes this stance, then the correct function is e^∫ln |fx| dx, if not, put a negative sign in front, It is an interesting question, though. 

Tuesday, July 2, 2013

Twin prime proof

Break up all numbers into sets of 6, because every 3rd odd number is composite. Therefore, we can conduct twin prime tests on pairs of numbers that are mod 6 ±1. The odds of a number being prime is approximately equal to (1-1/P1)*(1-1/P2)*(1-1/P3)...(1-1/Pn) Where Pn is the largest prime less than or equal to √x. Since these numbers are written in the form 6x ± 1, they're not divisible by 2 or 3. 

The probability that both these numbers (6x±1) are prime can be found using a variation of the earlier method. The odds that one of these numbers (picked before) is not divisible by 5 (it's not divisible by 2 or 3),  is 4/5.  The probability that a number not divisible by 5+2 is divisible by 5 is 3/4. Therefore, the probability that the numbers 6x±1 are both not divisible by 5 is 3/5. If one extends this for all primes, the probability of the pair 6x±1 not being divisible by a number P is (P-2)/P. Since the largest smallest prime factor of a number n can't be greater than √n, the probability of a pair 6x±1 being prime are approximately equal to (3/5)*(5/7)....*(Pn-2/Pn) Where Pn is the largest prime below √6x+1. 

This sequence yields a greater result than the sequence (3/5)*(5/7)....*(On-2/On) Where On is the largest odd number below √6x+1. That sequence's solution is 3/On. Therefore, the lowest possible probability that numbers of the form 6x±1 are both prime is equal to 3/√6x+1. Since we break the numbers up into sets of 6, the probability of this being true for any set of 2 numbers is 1/2√x+1. 
Therefore, the minimum number of paired primes between 1 and infinity is approximately equal to ∫1/(2[(x+1)] with limits 1 and infinity. Since the sum of probabilities ~ the average number of instances, as x tends to infinity. The integral of the above function=√(x+1), which becomes infinity as x reaches infinity. Therefore, there are an infinite number of twin primes. 

Monday, March 25, 2013

Nash equilibrium: hand cricket

Note: This strategy assumes that every run is of equal value, which may not be true in every case. For example, with one run to win, a 6 is worth as much as a 4.

For bowlers:

Numbers                Probabilities

1                              5.63%
2                             10.65%
3                             15.17%
4                             19.27%
5                             22.44%
6                             26.34%

For batsmen:

Numbers              Probabilities

1                            18.8%
2                            17.8%
3                            16.9%
4                            16.2%
5                            15.5%
6                            14.8%



Tuesday, November 29, 2011

Anmol On Secularism in India

This is a speech that I wrote for a debate last year, which I won:


Secularism is defined as: the concept that government or other entities should exist separately from religion and/or religious beliefs. "Secular" is a word found in the preamble of our constitution that has been there since 1976, when it was added in a constitutional amendment, along with the word "socialist". Unfortunately, as I shall show you in the next few minutes, our country has repeatedly betrayed its secularity, and therefore our constitution. Yes, I am for the motion "India is secular only in name". Our nation has made considerable progress in various areas, including technology, our economy, and secularity, but there are still gaping holes in our secularism.

Firstly, I would like to point out that a secular government should either a)be indifferent to religion, as stated in the definition, or b)treat all religions equally, regardless of following- as that would equal religious indifference. So if society were truly secular, there would be no holidays for hindu/muslim festivals, and workers would have to take leave if they wanted to celebrate them, or they would have to give other religions holidays, and if I were to start a religion tomorrow, it should have a few national holidays. One might say that this religion is illegitimate, but where do you draw the line of legitimacy? For this reason, it makes more sense for government to be indifferent to religion.

Since we have made it clear that government should stay away from religion, I would like to point out that the government of India doesn't have a uniform civil code for all religions. Only Muslim men are allowed to be polygamous while it would be a crime if a man of another religion, say, a Hindu man were to be polygamous. This law hasn't been changed, even after the addition of the word "secular" to our constitution. One could argue that the government is just enforcing religious rules on its citizens, but is the government supposed to enforce religious rules? Since religion is created due to belief in god, shouldn't god be enforcing them, unless government is playing god. The fact that government tries to enforce religious rules, means that it is participating in a religious activity, which is contrary to the word "secular".

The above statement was mainly theoretical, and my opponents would say that it doesn't deal with the practical reality in the nation. There are inter-religious friendships, and marriages, but every day, there are hate crimes, and honour killings due to these inter-religious relationships. Social evils like sati are still a very painful reality, and police turn a blind eye in many rural areas, due to religious beliefs. In 1986, in the famous Shah Bono case, Rajiv Gandhi, and the supreme court, refused to look at an Islamic divorce fairly to an Islamic woman, to prevent the alienation of a Muslim vote bank.

There are other such incidents, such as the famous Ahmedabad riots, where 1000's of muslims were killed, and the police famously ignored the massacre that was taking place. The Ayodhya incident, in 1994, where leading politicians in our country were behind the destruction of a mosque in Ram janmabhoomi. Their argument was, "There would be no church in Mecca, or temple in Vatican city", but those countries don't claim to be secular, and we do. The final verdict, where two thirds of the land was given to the Hindus, and one third to the Muslims, was even handed, which could have been shown as a proof of secularity, but there were clear legal arguments for both sides, and the dispute should have been decided one way or the other. The compromise might have been to prevent a riot, since it doesn't take 15 years to decide that a case can't be decided one way or the other. Although, I appreciate the noble cause of preventing a riot, the decision was taken on religious grounds, which would never happen in a truly secular country.

There are those that point out the peace after the Ayodhya verdict as a sign of a secular India. Since the word "secular" is written in the constitution, I presume that lack of secularism is a violation of our constitution and therefore a crime. To determine whether or not a crime has been committed, we need to look at instances where the crime has been committed, not instances where it hasn't been, for example, person a is accused of murder of person b, with person c as a witness. If person c says that he saw person a kill person b, then it proves murder, but if person c says that there was an instance where he saw person a not kill person b, it doesn't acquit him of the murder. Therefore, lack of unsecularism isn't secularism, but unsecular acts show a lack of secularism, and there have been many unsecular acts in our nation's recent history. Therefore, I must conclude that our nation isn't truly secular.

Sunday, November 27, 2011

Anmol on Terrorism

Anmol on Terrorism

In recent times the world has been plagued by terrorism, as there appears to be a bomb blast, or a mad man with a machine gun, every day, somewhere in the world. We still feel the effects of certain terrorist acts, and their repercussions, such as 9/11. Nations spend billions of dollars, even declare war over these acts, which makes you to ask, is it worth it? This article might make me appear like someone who doesn’t value human lives, which isn’t true, I value all human lives, however, I believe that the value of life is consistent, and not determined by cause of death.

9/11 was the single most deadly day due to terrorism, with the death of nearly 3,000 people. Soon after, the US declared war on Afghanistan, which was then run by the Taliban, with no objections, within the US, or internationally. They quickly deposed of the Taliban government, leaving it powerless, and forcing its remnants to hide in the mountainous region between Afghanistan and Pakistan. Unfortunately, all the leader of the movement had escaped, so the Western coalition decided to stay in the country, to try to eradicate the entire Taliban. Right now, 10 years later the American government is still there, although, in their favor, they’ve captured most of the senior leadership of both Al Qaeda and the Taliban.

In the following argument, I’ll assume that the war in Iraq wouldn’t have happened without 9/11, and the sensationalism it creates. The financial costs to the US, due to the wars in Iraq, Afghanistan, and Pakistan have been 3.2-4 trillion dollars. 6,500 US troops have perished, as well. For now, we’ll only look at whether or not the wars were beneficial to the US, and look at whether or not the US could’ve conducted the wars in a better manner. We can analyze the costs to Iraq and Afghanistan later.


Excluding 9/11, the average number of global deaths due to terrorism from 1995-2005 had been about 2 people per day. Including 9/11, about 3 people per day. Let’s assume that with superficial US intervention in both Iraq and Afghanistan i.e., if they withdrew after one year, the number of deaths would’ve been 3 times as much, an extremely liberal estimate. That would’ve been an extra 6 lives per day, for 10 years, or an additional 22,000 lives. That sounds like a lot at a superficial level, but if you subtract NATO troop losses, it amounts to an additional 15,000 lives. So, the value of each life amounts to 3 trillion/15,000, or about $200 million per life. They say you can’t put a value on human life, but various organizations have effectively done so in other ways. There are various other costs, such as the time and resources wasted by TSA searches, and other such utilization of resources, but we can ignore them, because the bias is still obviously prevalent without them.

We also need to include the fact that the above statistic referred to global death, and not deaths in the US. There have been at most 2 possible plots which could’ve developed into another 9/11 in the US, and assuming both succeeded, they would have led to a loss of 6,000 lives, still less than the number of US troops who have perished.

Firstly, diseases like Tuberculosis can be prevented for significantly less. The cost of the vaccination amounts to $200/year/life. Assuming Terrorism leads to a loss of 50 years, on average, the US is paying about $4,000,000/year/life. Yet, a trillion dollars has been spent preventing terrorism, and a significant, but relatively small amount has been spent preventing Tb. This is only one example, but when something is 20,000 times more cost effective than something else, the other thing can generally be disregarded.

An argument for the wars in Iraq and Afghanistan is that they helped the people in those nations. The people were helped by regime change, which would’ve happened regardless of whether or not the US engaged in “nation building”. The two wars have led to, according to some estimates, over a million civilian deaths. Although no one can deny the benefits of losing a tyrant as a leader, beyond a certain point, foreign intervention begins to be harmful to a country.

Other “great thinkers” claim that the US is only in those two countries because of oil. To those who endorse this views, I have two responses. The first one being that the amount the US has spent on military conflicts in the middle east is greater than the total value of oil it has extracted. The second is that China has extracted more oil from the middle East than the US. Enough said.

My arguments about Afghanistan and Iraq were more of a case study, than anything else. My main problem with terrorism is the opportunity cost, i.e. the resources wasted on terrorism that could’ve been spent elsewhere. Due to media coverage, etc. the average person spends more than 100 hours a year worrying about terrorism. If they earned a wage of $20/hour, they could’ve earned $2000 in that time, and saved 10 children, which seems more valuable than panicking about Al-Qaeda. As covered earlier, the money spent on terrorism can be better spent in an infinite number of other ways.


The main reason why terrorism flourishes is because of media sensationalism, more than anything. Media sensationalism leads to other mis-valuations, for example, a statistic which often shocks people is that there are twice as many deaths due to suicides than there are due to murder. Only 3% of all deaths in the 20th century (including wars, famines, etc.) have been due to non-natural causes, as opposed to 15% in the centuries before that. The world is getting less violent, yet we cover violence more. We can balance all violent deaths by increasing human life span by 1.5 years, which can be done by marginal medical improvements, or eating healthy, and taking occasional walks. If the US spent 5% of their defense budget on actual prevention of death, they would save significantly more lives than the rest of the defense budget does. The same can be said for any other country.

Fear of terrorism has been shown to be far more deadly than terrorism itself. The trillions dollars spent preventing terrorism, and rights given up in the name of prevention of terrorism seem to be doing more harm than good. Terrorism only flourishes because of media bias, and because politicians aren’t rewarded for crises prevented
, but penalized for crises which occur. Obama won’t get re-elected if he points out that average life span in the US increased by two years in his term. A small reduction in life expectancy isn’t seen as significant, although it's more statistically significant than un-natural death. If you look at it, terrorism's objective is to gain attention, and due to our fear of terrorism, they gain that attention, and hence get political clout. Fear of terrorism leads to terrorism. My message isn’t that terrorism related deaths are unimportant, it’s that non-terrorism deaths are important as well.


Wednesday, November 23, 2011

Anmol on Income and happiness

Anmol on Income and happiness


If you go to school with me, you already know what this article is about, due to our heated discussion in Eco class about it. However, if you weren’t present, this is solely about the correlation between Income and happiness, and the optimal income distribution for net happiness. Also, this article discusses the best income distribution in a society, and what government should do to achieve that distribution. Note that this assumes ceterus paribus: all other things being equal, it also assumes that income and wealth are synonyms, and interchangeable, feel free to make the formula more complex later on.

To understand the link between income and happiness, we must first accept three things. Firstly, that income isn’t the only factor, but a major factor affecting happiness. Secondly, that income has a positive correlation with happiness. Thirdly, that the relationship between income and happiness is less than linear, my assets total less than $10,000, while Warren Buffet has some $50,000,000,000, but he isn’t 5 million times happier than I am. I personally believe that there is no maximum happiness, although many people might dispute this claim.

I think the relationship between income and happiness is logarithmic, i.e. H=k*log I.
It seems to me that someone with 100 times my wealth will be as much happier than I am, as someone 100 times wealthier than him, will be happier than he is. This system seems plausible to me, though we will deal with more complex equations later. With the current formula, let’s assume that there are 2 people in the world (this can be extrapolated to much larger numbers). Their incomes are P and O, and P+O=I. Net happiness= log P+log O, Net happiness= log PO, therefore the point of maximization of PO, is the point of maximization of happiness. This is when P=O, i.e. when income are equal. Equality of income is the point at which happiness is maximized, in this situation.

Assuming you have a function for income vs happiness, to determine that the optimal distribution is when incomes are equal, we must make sure that when incomes are equal, i.e. if one person 1$, and the other person loses 1$, net happiness goes down. Change in happiness for each person ~ gradient of the curve (dy/dx). If gradient above is less than gradient below, in the happiness versus income curve, then it’s best to split wealth evenly. Therefore, the gradient should decrease as the value of x (in this case income), increases, or d^2y/dx^2 should be negative. For all less than linear equations, d^2y/dx^2 is negative, because dy/dx of x^-n, where n is a positive constant, will always be negative, and dy/dx of x^a, where a is between 0 and 1, will always result in a polynomial of the form kx^-n. Therefore, when a is between 0 and 1, when the equation is less than linear, it’s best to concentrate wealth towards the centre. When d^2y/dx^2 is 0, the distribution of wealth is irrelevant to net happiness, and when it is positive, it’s best to split the wealth unevenly.

It would be extremely unusual if net happiness could be perfectly graphed by a function. Surely, doubling one’s wealth while poor is worth significantly more than doubling it while rich. Assuming statements such as the one are true, the gradient of the curve still continues to decrease, so d^2y/dx^2 remains less than 0, and it remains better to split the wealth evenly. The gradient can only reduce, as the curve continues. Therefore, we can conclude that net happiness is maximized when income is equally distributed.


I’m sure the above statement makes me seem like a socialist. In fact, I strongly believe in
communism capitalism. I wanted to make it clear that the objective of a tax is not to blindly maximize net happiness. All of us know that socialism doesn’t work, because it disinsentivizes innovation, the engine for economic growth. However, lack of economic growth is only felt in the long run, while the positive attributes of redistribution are felt immediately, which is one of the reasons why socialist revolutions started off so well, and ended, well, not so well.

The first implication of this article is that progressive taxes are fair, although the extent to which they’re in place should be debated. I believe that in the long run, an increase in net wealth, leads to a total increase in societal wealth, for all classes, regardless of how the wealth is distributed initially. Many of the richest families 2,000 years ago, are normal families now, and many of the richest families now were normal 2,000 years ago, but we’ve all benefited from long run economic growth, despite the clear economic biases towards the rich in that era (flat taxes, feudalism, selective voting rights, etc.). However, you could argue that government shouldn’t care about the long long run, which makes sense if you believe that government is there to get re-elected, or serve it’s own purpose in some other way, in which case, changes which take more than 10 years are generally ignored regardless of their benefits. The first question which needs to be answered is “how much should a government base their decisions on long term good, and how far in the long term should they look?”

The next question which needs to be answered is “how progressive should progressive taxes be?”, any measure which can be used to derive, or calculate a perfect tax plan will be helpful.

The first implication of this concept was macroeconomic. The second, has to do with microeconomics. This is a good way to measure whether or not to take certain bets. The first thing this shows is that betting on a lottery, even with no rake, is completely irrational, because losing that 1 dollar, or other small amount of money, isn’t worth a one in a million chance at a million dollars, because the satisfaction of a million dollars isn’t a million times the satisfaction of 1 dollar. The second is that when bets are a very small percentage of your net worth, what probability dictates is generally your correct decision, however, when it’s a large percentage of your wealth, it differs largely from probability. For example, if you bet half your wealth, you need at least 1.71:1. The answer is probably more than that, so the curve is probably less than a logarithmic curve. In a survey, people were asked the minimum odds they needed on a coinflip to risk $100, they said 2.1:1. This would’ve been correct if they were betting half their wealth, but the correct answer (assuming $100,000 of total wealth), was 1.001:1. Another case of people misunderstanding statistics. If we manage to link happiness to income effectively, we can understand whether or not to take bets which are a certain percentage of our wealth, or other financial risks, such as betting on the stock market. Such a formula would be very valuable for academic purposes, although it would probably be ignored in real life.

Wednesday, November 16, 2011

Anmol On FIscal Policy Part 2

Anmol On Fiscal Policy:2

In my previous article I discussed how beyond a point running deficits reduces a country’s debt as a proportion of GDP. Now, we’ll do the math to calculate the position of that point, as well as finding how much your debt increases as a proportion of your GDP in any situation.
Basically, there are 4 different variables: Deficit (I), inflation multiplier(mpc*Gs/Gs+Gd) (M), GDP, and debt(d). Net Gain from deficit= debt/GDP (2)-debt/GDP (1). We assume GDP=1 for simplicity, because the actual value is irrelevant. In other words,
Gain= (d+d*I*M+I/1+I)-(d)
Multiplying and dividing by 1+I we get:
Gain=(d+dIM+I)-(d+dI)/1+I
Gain=d+dIM+I-d-dI/1+I
Gain=dIM+I-dI/1+I
Gain=dI(M-1)+I/1+I
Gain=I[d(M-1)+1)/1+I
Gain=I[1-d(1-M)]/1+I

therefore, if you have the figures of debt, deficit, and inflation multiplier, you can use that simple formula to calculate reduction in debt burden.

If gain=0, the point of madness, I[1-d(1-M)]/1+I
if I is not = 0, 1-d(1-M)=0
1=d(1-M)
d=1/(1-M)

As you can see, the formula accurately plots the next year’s national debt, as a proportion of the previous year’s national debt.