Women, men and money

From a dataset on restaurant tip included in the Python seaborn library, we investigate using Python with Jupyter Notebook how much money women and men relatively make, and why.

Most people don’t tip more or less because of server is a man or woman, but we do tip according to tip amount (for equal services).

I will tell you base on data analysis the real reason women make less is mostly because:
1. women work mostly lunch shifts
2. lunch bills are smaller than dinner ones.

Indeed, in every industry, including food services like in the restaurants, women have shouldered more share of the most difficult job in the world: parenting, and dedicated their time and energy to their families.

As a result, they have earned less money than men on average. Let’s give our appreciation to women for their roles in taking care of families!

There is a profound reason why we say “Mother nature”!

Should women work more dinner shifts and leave the important job of taking care of children to …?

That is a difficult question… Take a look at this Jupyter Notebook for the detailed data analysis.
More

Math olympia medal count analysis | 奥数奖牌分析

The International Mathematical Olympiad (IMO) is an annual six-problem mathematical olympiad for pre-college students younger than 20. The first IMO was held in Romania in 1959. As we will see, eastern Europeans were top performers in the IMO in the earlier years. You can find the summary data analysis in our Jupyter Notebook on GitHub.

It has since been held annually, except in 1980 (what happened in 1980?). More than 100 countries, representing over 90% of the world’s population, send teams of up to six students (under 20 years old) to compete.

Problems cover extremely difficult algebra, pre-calculus, and branches of mathematics not conventionally covered at school and often not at university level either, such as
– projective and complex geometry
– functional equations
– combinatorics
– number theory (where extensive knowledge of theorems is required).

No calculus is required. Supporters of not requiring calculus claim that this allows “more universality and creates an incentive to find elegant, deceptively simple-looking problems which nevertheless require a certain level of ingenuity”.

Rank Country Appearance Gold Silver Bronze Honorable_Mentions
0 1 China 32 147 33 6 0
1 2 United States 43 119 111 29 1
2 3 Russia 26 92 52 12 0
3 4 Hungary 57 81 160 95 10
4 5 Soviet Union 29 77 67 45 0
5 6 Romania 58 75 141 100 4
6 7 South Korea 30 70 67 27 7
7 8 Vietnam 41 59 109 70 1
8 9 Bulgaria 58 53 111 107 10
9 10 Germany 40 49 98 75 11

Debt | 债务

Exactly two years ago, we wrote about national debt.  It was close to $20 trillion at that time.  Now it is $22 trillion.


We are  presenting  very large numbers.

But large is only a relative term, depending on the unit we are using, and relative to what.

According to the Institute of International Finance, global debt, as of 3Q2018, is close to $244 trillion.
About one third of the debt was added in the last ten years or so. So that means that over the last ten years the total global debt grew by a half.

You can see it from the Global Debt Monitor January 2019 Report.

This probably does not mean much to you or me, unless we have some comparisons.

Visuals can help you see the numbers, but it stops short of helping us to understand the number, since money in dollars is just money in dollars unless we compare it with something.

How about we compare it with GDP (gross domestic product)? GDP in dollar is the value of all the things people produce or service for a period of time in dollar.

So debt to GDP ratio is like the amount of money you owe at the end of the year relative to the amount of money you have made over the year.   When the ratio is over 1, it means what we owe is more than what we have made in a year.

Now hopefully we can understand the ratio a little bit.

For a great narrative of history of US debt to gdp ratio, see “The Long Story of U.S. Debt, From 1790 to 2011, in 1 Little Chart” from The Atlantic by Matt Phillips.

The article was written on Nov 13, 2012. But history does not go away.

You can connect the dots to the following chart, which you can find from Federal Reserve Bank of St. Louis.  It seems that we have debt to GDP ratio getting close to historical highest level.

That was right after World War II.

So what is in the US debt?

The total US debt now is about $22 trillion.

The U.S. debt to China is $1.138 trillion as of October 2018. That’s 29 percent of the $3.9 trillion in Treasury bills, notes, and bonds held by foreign countries.

The rest of the $22 trillion national debt is owned by either the American people or by the U.S. government itself. China has the greatest amount of U.S. debt held by a foreign country.

Domestically, the total US household debt as of 4Q2018 is at $13.54 trillion (New York Fed). For a fantastic and fascinating visual account of the numbers, see the report by New York Fed.

You can find the numbers and reports easily from different federal reserve banks and government office such as the Congressional Budget Office, and the US Treasury.

These numbers, ratios and time series by component are a lot more interesting and tell a whole lot more than everyday noisy news.

What is collateral | 什么是抵押 (dǐ yā)

I was writing a document on credit risk while the children were playing.  Suddenly one sneaked up behind my back and asked “what is collateral?”  什么是抵押 (dǐ yā)?

Hmm. It is something you use to secure money borrowed. That answer is not clear to children.

So, how about this:

If your aunt just bought a house with a mortgage (i.e. with money borrowed from a bank or some other places), if your aunt does not pay back the money borrowed, what will the lender do? The lender (for example, a bank) will take over the house and sell it to get the money back. The house is the collateral for the money borrowed.

Recall in Shakespeare’s play “The Merchant of Venice”, Antonio borrowed money from moneylender Shylock. If Antonio were unable to repay it at the specified date, Shylock would have taken a pound of Antonio’s flesh according to their agreement. Wow. That’s unthinkable in today’s world. But in 16th century, a pound of human flesh could be conceived as “collateral”.

Herstory of money-1 | 钱的历史

This is the first installment of a series of post about money, cryptocurrency and credit scoring, accompanied by Python Jupyter Notebook in our GitHub repo on credit scoring.

In this post we talk about paper money 纸币.  The reason why we keep it in the practical math category is because the herstory of money is also the herstory of math.  In God we trust and in math we trust.  God made the universe with beautiful math.

Did you know that paper money 纸币 was first used in ancient China around the 11th century 北宋朝?

Paper money was used broadly during those days due to shortage of copper and the convenience of paper money. However, the convenience combined with the unlimited power of the government to print money lead to inflation, subsequently the loss of credibility of the government, and its eventual downfall. So, even though the Northern Song dynasty had an advance monetary system, its credit failed due to long and costly wars.

Did you know that the Chinese Southern Song 南宋 dynasty government printed money in no less than six ink colors to prevent counterfeiting?

They printed notes with intricate designs and sometimes even with mixture of unique fiber in the paper to avoid counterfeiting. That was in 1107!

Backed by gold or silver too?

Isn’t it amazing that their nationwide standard currency of paper money was backed by gold or silver?! That was in between 1265 and 1274.

In the 13th century, Chinese paper money of Mongol Yuan 元 became known in Europe through the accounts of travelers, such as Marco Polo

“All these pieces of paper are, issued with as much solemnity and authority as if they were of pure gold or silver… with these pieces of paper, made as I have described, Kublai Khan causes all payments on his own account to be made; and he makes them to pass current universally over all his kingdoms and provinces and territories, and whithersoever his power and sovereignty extends… and indeed everybody takes them readily, for wheresoever a person may go throughout the Great Khan’s dominions he shall find these pieces of paper current, and shall be able to transact all sales and purchases of goods by means of them just as well as if they were coins of pure gold”
— Marco Polo, The Travels of Marco Polo

What is social credit score | 什么是社会信用分

Social credit score 社(shè)会(huì)信(xìn)用(yòng)分(fēn) means rating how trustworthy you are based on your spending habits, social connections and your online behavior on social media. Traditional credit scores are what lending institutions use to judge how likely you will pay back the money before they lend you. Traditional credit score use information such as whether and how long you have a job, how much money you owe relative to how much you earn, and so on. Social credit is being used in similar ways with a different set of data. Tencent Credit 腾讯信用分 and Sesame Credit 芝麻信用分 are the prime examples.

For example, social credit score can be like a test score number that ranges between 300 and 850 and made up of five dimensions/categories 5 个维度:

  • social connections
  • consumption behavior
  • security
  • wealth
  • compliance

WSJ reported in 2016 on social credit in China with an article title “China’s New Tool for Social Control: A Credit Rating for Everything“. The words “social control” and “Big Brother” have bad connotations. However, politics aside, we do appreciate people who have good social credit.

What can social credit scores be used for? Traditional credit scores are used by banks or other lenders to approve loans, used by employers to screen candidates, and some other kind of approvals. Likewise, social credit scores can be used for similar purposes. Alibaba’s affiliate Ant Financial opened a strictly online bank called MyBank that serves small businesses and individuals. This online bank takes deposits the same way as Synchrony or AlyBank in the US do. But it also gives out unsecured loans (without any collateral) up to $850,000. That is a lot of money to lend without collateral (by the way, mortgages are secured loans collateralized by the house). Underlying the decision to lend or not to lend is social credit score, calculated based on huge amount of online transaction data.

Back to the US, which companies may have data that can generate a full or partial social credit score? I think Airbnb, Amazon, Facebook, Lyft, UBER and etc. all have huge amount of data that can be used for credit scoring. Due to the high regulatory cost (banks are highly regulated), it is not likely that any of them would want to become a bank. But they can take some of the businesses that banks always have been doing. For example, Amazon has Amazon Cash and variations of it in various countries such as the U.K. Also, UBER has recently offered UBER cash. These are banking businesses: they allow people to shop or ride without a credit or debit card as long as you load your account with cash.

To see a world in a grain of sand | 从沙粒看世界

Professor ShouCheng Zhang “passed away”.  He is forever with us, seeing a world in a grain of sand, holding infinity in hand.

这是所有视频里最喜欢的一个视频。 张教授深入浅出,循循善诱。尽管已经“离世”, 张教授永远和我们在一起从沙粒看世界,把永恒留在刹那时光。

We won’t quote any physics or mathematics from the video, except the title of the lecture, originally from William Blake, and dedicate them to Professor Zhang:

To see a world in a grain of sand
And a heaven in a wild flower,
Hold infinity in the palm of your hand
And eternity in an hour.
一颗沙里看出一个世界
一朵野花里一座天堂
把无限放在你的手掌
永恒在一剎那里收藏

More

First Kindle book | 第一本Kindle书

很久前我们想在kindle出版儿童电子书,但是买回kindle一看,真的很不喜欢。 黑白没有彩色,而且屏幕很小,有时下载速度也有问题。完全不像iPad 那么生动有趣。最近发现有彩色儿童版的Kindle了,于是出版了我们第一本电子书: Chinese Poems for Kids by A Kid.

A long time ago we thought about Kindle publishing kids’books. But we scrapped the idea after buying a kindle home: it was only black and white, the screen too small. Lately we found that Kindle has color version for children. So here is our first Kindle book: Chinese Poems for Kids by A Kid.

Copyright © Magic Math Mandarin

Chinese poems for kids by a kid

Fruits | 水果

Merry Christmas and a happy New Year!

Fruits 水果(shuǐguǒ) are colorful, delicious and healthy. I hope you are eating lots of fruits in this holiday season!

红(hóng) 红(hóng) 的(de) 苹(píng) 果(guǒ)
弯(wān) 弯(wān) 的(de) 香(xiāng) 蕉(jiāo)
紫(zǐ) 色(sè) 的(de) 葡(pú) 萄(táo)
圆(yuán) 圆(yuán) 的(de) 大(dà) 西(xī) 瓜(guā)
水(shuǐ) 果(guǒ) 好(hǎo) 吃(chī) 又(yòu) 营(yíng) 养(yang)

Chinese style education & empty basketball courts |中国式教育和空荡荡的蓝球场

I was in China this November to conduct surveys on education.  I had a few chances of sitting in some after school education programs and cram school classes, including XDF新东方, and was shocked by the amount of work Chinese kids have to do and was saddened by the way they are learning.

Let’s talk about the amount of work first.   I saw very few kids out and about any time of day except commuting hours.   Basketball courts are empty, even on weekends.   Where are all the kids?  They are in endless cram school 补习班 classes.

A middle school child routinely gets up before 7 am and does not go to sleep until midnight or after.   Middle school students stay in school until 8 pm, and work on additional homework from 8 pm till midnight.   Younger students are often working similar hours.
More