OpenLLM-France/wikimedia huggingface dataset:
# Econometric Theory/The Coefficient of Determination: R

The squared coefficient of determination is a measure of how well the explanatory variables predict the explained variable. It is the proportion of variability in the dependent variable that is accounted for by the linear relationship with the independent variables. It provides a measure of how well future outcomes are likely to be predicted by the model.
There are several different definitions of R$^2$ which are only sometimes equivalent. One class of such cases includes that of linear regression. In this case, if an intercept is included then R$^2$ is simply the square of the sample correlation coefficient between the outcomes and their predicted values, or in the case of simple linear regression, between the outcomes and the values of the single regressor being used for prediction. In such cases, the coefficient of determination ranges from 0 to 1. Important cases where the computational definition of R$^2$ can yield negative values, depending on the definition used, arise where the predictions which are being compared to the corresponding outcomes have not been derived from a model-fitting procedure using those data, and where linear regression is conducted without including an intercept. Additionally, negative values of R$^2$ may occur when fitting non-linear trends to data. In these instances, the mean of the data provides a fit to the data that is superior to that of the trend under this goodness of fit analysis.

## Notes

* ↑ Cameron, A.C., Windmeijer, F.A.G., (1997)."An R-squared measure of goodness of fit for some common nonlinear regression models." Journal of Econometrics, Volume 77, Issue 2, April 1997, Pages 329-342.
# Econometric Theory/Terminology and Notation
## Terminology and Notation

Above we discussed dependent variables and explanatory variables. There are many synonyms of various terms and these are no exception. The dependent variable can also be called:
* Explained variable
* Predictand
* Regressand
* Response
* Endogenous
* Outcome
* Controlled variable
and the explanatory variable:
* Independent variable
* Predictor
* Regressor
* Stimulus
* Exogenous
* Covariate
* Control variable
If we have one explanatory variable. We get what is called two-variable (simple) regression analysis. If we include more than one explanatory variable, it is called multiple regression analysis.
The error term is assumed to be random or stochastic variable. It implies that it can take any value within a given probability distribution and there are no other factors determining it. If other influences were known, it would no longer be random.

## Bibliography

* Gujarati, D.N. (2003). Basic Econometrics, International Edition - 4th ed. McGraw-Hill Higher Education. pp. 24–25. ISBN 0-07-112342-3.
# Econometric Theory/Tests for Heteroskedasticity

Graphical tests can be used to suggest that there is heteroskedasticity.
The many analytical tests for heteroskedasticity should be considered complimentary, because none of them work very well.
# Econometric Theory/Summation and Product Operators

To sum a series of variables $x$, the Greek capital letter sigma Σ is used:
$\Sigma _{i=1}^{n}x_{i}=x_{1}+x_{2}+\ldots +x_{n}$.
There are some properties concerning the summation operator Σ:
1. $\Sigma _{i=1}^{n}k=nk$, where k is a constant.
2. $\Sigma _{i=1}^{n}kx_{i}=k\Sigma _{i=1}^{n}x_{i}$, where k is a constant.
3. $\Sigma _{i=1}^{n}(a+bx_{i})=na+b\Sigma _{i=1}^{n}x_{i}$, where a and b are constants. This is a result of rules 1 and 2 above.
4. $\Sigma _{i=1}^{n}(x_{i}+y_{i})=\Sigma _{i=1}^{n}x_{i}+\Sigma _{i=1}^{n}y_{i}$,
The double summation operator is used to sum up twice for the same variable:
${\begin{aligned}\Sigma _{i=1}^{n}\Sigma _{j=1}^{m}x_{ij}&=\Sigma _{i=1}^{n}(x_{i1}+x_{i2}+\ldots +x_{im})\\&=(x_{11}+x_{21}+\ldots +x_{n1})+(x_{12}+x_{22}+\ldots +x_{n2})+\ldots +(x_{1m}+x_{2m}+\ldots +x_{nm})\\\end{aligned}}$
The double summation operator has the following properties:
1. $\Sigma _{i=1}^{n}\Sigma _{j=1}^{m}x_{ij}=\Sigma _{j=1}^{m}\Sigma _{i=1}^{n}x_{ij}$. The order of the summation signs is interchangeable.
2. $\Sigma _{i=1}^{n}\Sigma _{j=1}^{m}x_{i}y_{j}=\Sigma _{i=1}^{n}x_{i}\Sigma _{j=1}^{m}y_{j}$.
3. $\Sigma _{i=1}^{n}\Sigma _{j=1}^{m}(x_{i}+y_{j})=\Sigma _{i=1}^{n}x_{i}\Sigma _{j=1}^{m}x_{i}j+\Sigma _{i=1}^{n}x_{i}\Sigma _{j=1}^{m}y_{ij}$.
4. ${\begin{aligned}\left[\Sigma _{i=1}^{n}x_{i}\right]^{2}&=\Sigma _{i=1}^{n}{x_{i}}^{2}+2\Sigma _{i=1}^{n-1}\Sigma _{j=i+1}^{n}x_{i}x_{j}\\&=\Sigma _{i=1}^{n}{x_{i}}^{2}+2\Sigma _{i<j}x_{i}x_{j}\\\end{aligned}}$.
Finally, the product operator Π is defined as: $\Pi _{i=1}^{n}x_{i}=x_{1}\cdot x_{2}\cdots x_{n}$.

## Bibliography

* Gujarati, D.N. (2003). Basic Econometrics, International Edition - 4th ed. McGraw-Hill Higher Education. pp. 869–870. ISBN 0-07-112342-3.
# Econometric Theory/What is Regression?
## Historical Meaning of Regression

The historical meaning of the term regression was coined by statistician Francis Galton. He observed that tall parents tended to have short children and short parents tended to have tall children. It seemed as though the height of people was heading to the average of the population across generations. His friend Karl Pearson collected statistics on the heights of individual family members. He found that sons of short fathers tended to be taller than the average height of those fathers and sons of tall fathers thus turned out to be shorter than their fathers.

## Modern Interpretation of Regression

It can be said that regression analysis is used to model relationships between variables and determine the magnitude of those relationships. Regression analysis is really a more accurate description for regression, but regression is fully comprehensible as an abbreviated term and we will use that one henceforth.

## Examples

A number of examples where regression can be used is:
* 1. Galton was interested in finding out why average height was stable over generations. We could also say that we are interested in finding out why the average height of sons would be different from the average height of fathers. A hypothetical distribution can be seen in the scatter diagram to the right. In it, you can also see the regression line which shows the average height of sons given the average height of the fathers.
{scatter diagram}
* 2. A monopolist wants to know how demand adjusts for changes in price or output. This allows him to maximise profit. This price responsiveness is called price elasticity.
* 3. The Phillips curve describes the effect of changes in unemployment to the unemployment rate. This could be used to predict a suitable level of inflation that is suitable to the public opinion on unemployment.
* 4. A policy maker may want to see if there is a relationship between expenditure on police and the crime rate in a particular area. It can be useful if we want to know how to tackle crime more efficiently by allocating more money where crime is higher.

## Notes

* ↑ Regression analysis
* ↑ Examples 1-3 from Gujarati (2003, p.18-21)

## Wikipedia links

Regression analysis

## Bibliography

* Gujarati, D.N. (2003). Basic Econometrics, International Edition - 4th ed. McGraw-Hill Higher Education. pp. 16–21. 0-07-112342-3.
# Econometric Theory/Time-Series Analysis

A time-series is a set of data from different points in time.
# Chinese Medicinal Formulas/Prescriptions for Relieving Exterior Syndromes
## Introduction

Prescriptions for relieving exterior syndromes are used to induce diaphoresis, expel pathogenic factors from muscles and skin, promote eruptions, and to treat exterior syndromes. Exterior syndromes fall into two categories, namely, wind-cold type and wind-heat type.

## Types of Formulas

* Pungent and Warm Prescriptions
* Pungent and Cool Prescriptions
# Chinese Medicinal Formulas/Sedative Prescriptions
## Introduction

Prescriptions for sedation are used to tranquilize the mind.

## Types of Formulas

* Prescriptions with Heavy Sedatives
* Sedative Prescriptions with Tonic Effects
# Chinese Medicinal Formulas/Sedative Prescriptions with Tonic Effects
## Introduction

Sedative prescriptions with tonic effects are used to tranquilize the mind and nourish yin and blood. They are suitable for irritability as a result of failure of blood to nourish the heart and liver.

## Prescriptions

* Suanzaoren Tang
* Tianwang Buxin Dan
* Ganmai Dazao Tang
# Chinese Medicinal Formulas/Prescriptions for Resuscitation
## Types of Formulas

* Prescriptions for Inducing Resuscitation with Cold Herbs
* Warm-natured Prescriptions for Inducing Resuscitation
# Chinese Medicinal Formulas/Prescriptions for Suppressing upward Adverse Flow of Qi
## Prescriptions

* Suzi Jiangpi Tang
* Dingchuan Tang
* Xuanfu Daizhe Tang
* Jupi Zhuru Tang
# Chinese Medicinal Formulas/Prescriptions for Treating Wind Syndrome
## Introduction

Prescriptions for treating wind syndrome were usually pungent in flavor, and were used to dispel pathogenic wind.

## Types of Formulas

* Prescriptions for Dispelling Exogenous Wind
* Prescriptions for Calming Endogenous Wind
# Chinese Medicinal Formulas/Prescriptions for Warming the Interior
## Introduction

Prescriptions for warming the interior are used to warm the interior, restore yang, dispel cold, and promote blood circulation..

## Types of Formulas

* Prescriptions for Warming the Middle-energizer to Dispel Cold
* Prescriptions for Depleted Yang to Rescue the Patient from Collapse
* Prescriptions for Warming the Meridians to Dispel Cold
# Chinese Medicinal Formulas/Prescriptions with Heavy Sedatives
## Introduction

Prescriptions with heavy sedatives are used to tranquilize the mind, suppress yang and purge fire, when there is yang hyperactivity of the heart and liver. These prescriptions tend to impair stomach-qi, and therefore prolonged administration is inadvisable. These prescriptions should not be taken in large dosages.

## Prescriptions

* Zhusha Anshen Wan
* Cizhu Wan
# Chinese Medicinal Formulas/Purgative Prescriptions
## Introduction

Purgative prescriptions were used to relieve constipation, purge away heat, evacuate retention, end eliminate retained fluid in the treatment of interior syndromes of excess type.

## Types of Formulas

* Purgative Prescriptions of Cold Nature
* Purgative Prescriptions of Warm Nature
* Prescriptions of Causing Laxation
* Prescriptions of Eliminating Fluid Retention
* Prescriptions for Purgation Associated with Reinforcement
# Chinese Medicinal Formulas/Prescriptions for Treating Shaoyang Disease by Mediation
## Introduction

Shaoyang diseases are febrile diseases that affect the shaoyang meridian. It includes the common cold, influenza, chronic hepatitis, acute or chronic cholecystitis, pleuritis, pyelonephritis, postpartum infection and gastric ulcer.

## Prescriptions

* Xiao Chaihu Tang
* Haoqin Qingdan Tang
# Chinese Stories/Nüwa

The Bible says that God made people and a great big flood. In Chinese mythology, the goddess Nüwa also made people, but rather than making a big flood, she stopped one.

## The story

Nüwa existed in the beginning of the world. She felt lonely as there were no animals so she began the creation of animals and humans. On the first day she created chickens. On the second day she created dogs. On the third day she created sheep. On the fourth day she created pigs. On the fifth day she created cattle. On the sixth day she created horses. On the seventh day she began creating men from yellow clay, sculpting each one individually, yet after she had created hundreds of figures in this way she still had more to make but had grown tired of the laborious process.
So instead of hand-crafting each figure, she dipped a rope in clay and flicked it so blobs of clay landed everywhere; each of these blobs became a common person. Nüwa still laboriously crafted some people out of clay, who became nobles.
There was a quarrel between two of the more powerful gods, and they decided to settle it with a fight. When the water god Gong Gong saw that he was losing, he smashed his head against Mount Buzhou , a pillar holding up the sky. The pillar collapsed and caused the sky to tilt towards the northwest and the earth to shift to the southeast. This caused great calamities, such as unending fires, vast floods, and the appearance of fierce man-eating beasts. Nüwa cut off the legs of a giant tortoise and used them to supplant the fallen pillar, alleviating the situation and sealing the broken sky using stones of seven different colours, but she was unable to fully correct the tilted sky. This explains the phenomenon that sun, moon, and stars move towards the northwest, and that rivers in China flow southeast into the Pacific Ocean.
# Chinese Stories/Wu Gang

Wu Gang or Wu Kang, is a character in Chinese folklore and Taoism. who was set the task of cutting down a self-healing bay laurel tree on the moon. The story of Wu Gang has often been associated with the Mid-Autumn Festival, also known as the Moon Festival. The reason for this connection remains unclear, although different versions of the story offer several different explanations.
The Book of the Master of Huainan, from the Han Dynasty, records that when the moon waxes, the foot of an immortal grows into a laurel. However, Wu Gang is not mentioned in that book.
Miscellaneous Morsels from Youyang records that the tree on the moon is over five hundred chi high, and Wu Gang of Xihe stands under it. It is also recorded that immortals are sent to the moon to chop down the laurel tree when they make a mistake.
In the earliest known version of the story as it exists now, Wu Gang's wife had an affair with Yandi's grandson and had three sons with him. Wu murdered Yandi's grandson in revenge. Consequently, Yandi ordered Wu to be banished to the moon, where he would cut down a laurel tree. However, the tree healed itself after each blow. Consequently, Wu was forced to spend eternity trying to perform a task that could never be completed.
In another version of the tale, Wu Gang wished to learn to become an immortal but he did not try very hard. The Jade Emperor was furious, and decided to punish him. The Emperor created a cherry bay tree on the moon. Wu Gang was asked to chop it down in order to become an immortal. Wu Gang tried to chop down the tree but, because of the tree's self-healing abilities, it was impossible. The shadows on the moon are said to be created by the cherry bay tree.
In yet another version, Wu wished to be taught the method of eternal life. He found a teacher in the mountains. When his teacher tried to teach him to heal, Wu gave up after three days. When Wu was taught to play Chinese chess, he gave up learning after two days. When Wu received lessons in the method of eternal life, he lost interest after a day. His teacher sent him to the moon to chop down a tree of unnamed species.

## References in literature

Miscellaneous Morsels from Youyang, mentioned above, also includes Wu Gang's folklore.

## References

* 1 2 "Wu Kang". S.K.H. Kei Oi Primary School. Retrieved 2009-08-06.
* 1 2 3 "吳剛砍玉桂樹" (in Chinese). Hong Kong Space Museum. Retrieved 2009-08-05.
* 1 2 3 4 5 "Wu Gang Chops the Laurel". Taoist Culture and Information Centre. Retrieved 2009-08-05.
* 1 2 "Mid-Autumn Festival Story". Retrieved 2009-08-06.
* ↑ "中秋傳說之——吳剛伐桂" (in Chinese). National Taipei University. Retrieved 2009-08-05.
# Chinese Stories/List of characters
## B
### Bao Si

    Concubine of You of Zhou

## C
### Chuang-tzu

    Author of the frog of the well

## D
### Daji

    Zhou of Shang's woman

### Duke of Zhou

    Regent for Cheng of Zhou

## F
### Frog

    Lived in the bottom of a well and was happy about it

## G
### Guo Shifu

    The official who suggested the tricking of the lords to You of Zhou

## H
### Huhai

    See Qin Er Shi.

## L
### Li Si

    The man who suggested the burning of the books and burying of Confucian scholars and alchemists. Was executed by Zhao Gao.

## M
### Marquis of Shen

    Lord who defeated You of Zhou

## P
### Ping of Zhou

    See Prince Yijiu

### Prince Bofu

    Son of You of Zhou and Bao Si

### Prince Yijiu

    Grandson of the Marquis of Shen, son of You of Zhou and Queen Shen, later Ping of Zhou

## Q
### Qin Er Shi

    The second emperor of the Qin dynasty. Was stupid and let Zhao Gao take all the power. Zhao Gao killed him.

### Qin Shihuangdi

    Conquered the other countries and unified China. He died at Shaqiu.

### Queen Shen

    Daughter of the Marquis of Shen, former wife of You of Zhou and mother of Prince Yijiu (later Ping of Zhou)

## S
### Softshell turtle

    The character who told the frog of the sea

## W
### Wen of Zhou

    Father of Wu of Zhou

### Wu of Zhou

    Founder of the Zhou dynasty

## Y
### You of Zhou

    Last king of the western Zhou dynasty

### Ying Huhai

    See Qin Er Shi.

### Ying Zheng

    See Qin Shihuangdi.

## Z
### Zhao Gao

    A eunuch who made himself the chancellor of the Qin dynasty after Li Si's death. He killed Qin Er Shi, so Ziying killed him.

### Ziying

    Third emperor of the Qin dynasty. Was declared emperor by Zhao Gao. When Xiang Yu entered the capital he killed Zhao and surrendered. Xiang murdered him anyway.

### Zhou of Shang

    The last king of the Shang dynasty
# Chinese Stories/The Feast at Hong Gate

The Feast at Hong Gate was a dangerous feast. It was the event that determined the certain failure of Xiang Yu. Here is the story.
# Economic Sophisms/66

<pagequality level="4" user="Zoeannl" />style="background: #ececec; text-align: left; padding-left: 0.5em; font-weight: bold;" class="table-rh"
A Poor vine-dresser of the Gironde had trained with fond enthusiasm a slip of vine, which, after much fatigue and much labour, yielded him, at length, a tun of wine; and his success made him forget that each drop of this precious nectar had cost his brow a drop of sweat. "I shall sell it," said he to his wife, "and with the price I shall buy stuff sufficient to enable you to furnish a trousseau for our daughter." The honest countryman repaired to the nearest town, and met a Belgian and an Englishman. The Belgian said to him: "Give me your cask of wine, and I will give you in exchange fifteen parcels of stuff." The Englishman said: "Give me your wine, and I will give you twenty parcels of stuff; for we English can manufacture the stuff cheaper than the Belgians." But a Customhouse officer, who was present, interposed, and said: "My good friend, exchange with the Belgian if you think proper, but my orders are to prevent you from making an exchange with the Englishman." "What!" exclaimed the countryman; "you wish me to be content with fifteen parcels of stuff which have come from Brussels, when I can get twenty parcels which have come from Manchester?" "Certainly; don't you see that France would be a loser if you received twenty parcels, instead of fifteen?" "I am at a loss to understand you," said the vine-dresser, "And I am at a loss to explain it," rejoined the Customhouse official; "but the thing is certain, for all our deputies, ministers, and journalists agree in this, that the more a nation receives in exchange for a given quantity of its products, the more it is impoverished." The peasant found it necessary to conclude a bargain with the Belgian. The daughter of the peasant got only three-quarters of her trousseau; and these simple people are still asking themselves how it happens that one is ruined by receiving four instead of three; and why a person is richer with three dozens of towels than with four dozens.
# Economic Sophisms/6

<pagequality level="0" user="Spangineer" />
# Economic Sophisms/65

Now, it is precisely the gratuitous half (pardon the word) which we contend should be excluded. You say, How can natural labour sustain competition with foreign labour, when the former has all the work to do, and the latter only does one-half, the sun supplying the remainder? But if this half, being gratuitous, determines you to exclude competition, how should the whole, being gratuitous, induce you to admit competition? If you were consistent, you would, while excluding as hurtful to native industry what is half gratuitous, exclude a fortiori and with double zeal, that which is altogether gratuitous.
Once more, when products such as coal, iron, corn, or textile fabrics, are sent us from abroad, and we can acquire them with less labour than if we made them ourselves, the difference is a free gift conferred upon us. The gift is more or less considerable in proportion as the difference is more or less great. It amounts to a quarter, a half, or three-quarters of the value of the product, when the foreigner only asks us for three-fourths, a half, or a quarter of the price we should otherwise pay. It is as perfect and complete as it can be, when the donor (like the sun in furnishing us with light) asks us for nothing. The question, and we ask it formally, is this, Do you desire for our country the benefit of gratuitous consumption, or the pretended advantages of onerous production? Make your choice, but be logical; for as long as you exclude as you do, coal, iron, corn, foreign fabrics, in proportion as their price approximates to zero, what inconsistency would it be to admit the light of the sun, the price of which is already at zero during the entire day!
# Economic Sophisms/67

<pagequality level="4" user="Zoeannl" />style="background: #ececec; text-align: left; padding-left: 0.5em; font-weight: bold;" class="table-rh"
At a time when everybody is bent on bringing about a saving in the expense of transport—and when, in order to effect this saving, we are forming roads and canals, improving our steamers, and connecting Paris with all our frontiers by a network of railways—at a time, too, when I believe we are ardently and sincerely seeking a solution of the problem, how to bring the prices of commodities, in the place where they are to be consumed, as nearly as possible to the level of their prices in the place where they were produced,—I should think myself wanting to my country, to my age, and to myself, if I kept longer secret the marvellous discovery which I have just made.
The illusions of inventors are proverbial, but I am positively certain that I have discovered an infallible means of bringing products from every part of the world to France, and vice versa at a considerable reduction of cost.
Infallible, did I say? Its being infallible is only one of the advantages of my invention.
It requires neither plans, estimates, preparatory study, engineers, mechanists, contractors, capital, shareholders, or Government aid!
It presents no danger of shipwreck, explosion, fire, or collision!
It may be brought into operation at any time!
Moreover—and this must undoubtedly recommend it to the public—it will not add a penny to the Budget, but the reverse. It will not increase the staff of functionaries, but the reverse. It will interfere with no man's liberty, but the reverse.
It is observation, not chance, which has put me in possession of this discovery, and I will tell you what suggested it.
I had at the time this question to resolve:
"Why does an article manufactured at Brussels, for example, cost dearer when it comes to Paris?"
I soon perceived that it proceeds from this: That between Paris and Brussels obstacles of many kinds exist. First of all, there is distance, which entails loss of time, and we must either submit to this ourselves, or pay another to submit to it. Then come rivers, marshes, accidents, bad roads, which are so many difficulties to be surmounted. We succeed in building bridges, in forming roads, and making them smoother by pavements, iron rails, etc. But all this is costly, and the commodity must be made to bear the cost. Then there are robbers who infest the roads, and a body of police must be kept up, etc.