Jacob Bernoulli's Legacy in Wolfram Language (Mathematica)

Original author: Oleksandr Pavlyk
  • Transfer

Translation of the post by Oleksandr Pavlyk, “ Jacob Bernoulli's Legacy in Mathematica ”.
You can download the translation in the form of a Mathematica document, which contains all the code used in the article, as well as additional materials, here .


January 16, 2015 marks the 360th anniversary of the birth of Jacob Bernoulli .

In [1]: =

jacob-bernoulli-legacy_1.gif

Out [2] =

jacob-bernoulli-legacy_2.png

In [3]: =

jacob-bernoulli-legacy_3.png

Out [3] =

jacob-bernoulli-legacy_4.png

In [4]: ​​=

jacob-bernoulli-legacy_5.png

Out [4] =

jacob-bernoulli-legacy_6.png

Jacob Bernoulli became the first mathematician of the famous Bernoulli family , to which many famous mathematicians XVII and XVIII centuries.

The mathematical legacy of Jacob Bernoulli is very rich. He introduced the so-called Bernoulli numbers (Wiki / MathWorld ), found a solution to the Bernoulli differential equation ( Wiki / MathWorld ), studied the Bernoulli process ( Wiki / MathWorld ), proved the Bernoulli inequality ( Wiki / MathWorld ), calculated the number e ( Wiki / MathWorld ), and also revealed the weak law of large numbers (Bernoulli's theorem) ( Wiki / MathWorld ).

In [5]: =

jacob-bernoulli-legacy_7.png

Out [5] =

jacob-bernoulli-legacy_8.png

Bernoulli's Treatise Ars Conjectandi (The Art of Conjecturing ) was posthumously published in 1713, 8 years after his death, and was written in Latin, the lingua franca of his time. It is considered as a fundamental work on probability theory. Its importance is evidenced, in particular, by the fact that it was translated into French by G. Le Roy in 1801 and, recently, into English by ED Sylla in 2005.

Ars Conjectandi consists of 4 parts. The first part reproduces the work of Christian Huygens De Ratiociniis in Ludo Aleae . ( On Reasoning in Games of Chance- About calculations in a game of chance) with extensive comments from Bernoulli and detailed solutions to the five Huygens problems posed at the end of Huygens's work with answers, but without proof. In the first part, Bernoulli also deduces the probability that among n independent trials there will be at least m successful if the probability of success in each test is p :

jacob-bernoulli-legacy_9.png

The second part of “The Doctrine of Permutations and Combinations” is devoted to combinatorics and the study of curly numbers ( Wiki / MathWorld ), i.e. numbers that can be represented as a set of points located on a plane in the form of regular geometric shapes:

jacob-bernoulli-legacy_10.png

It was in this part that Bernoulli introduced the so-called Bernoulli numbers. He began by saying that the revealed relation for the binomial coefficients jacob-bernoulli-legacy_11.png, which has the form:

jacob-bernoulli-legacy_12.png.

In [6]: =

jacob-bernoulli-legacy_13.png

Out [6] =

jacob-bernoulli-legacy_14.png


Bernoulli knew that for a fixed value of the number m , the binomial coefficient jacob-bernoulli-legacy_15.pngis a polynomial in the variable n , namely jacob-bernoulli-legacy_16.png. This identity allowed him to derive the values ​​of the sums of the degrees of natural numbers jacob-bernoulli-legacy_17.png. He got a table of results for 0≤m≤10 .

In order to reproduce the table obtained by Bernoulli, we create a function defining equations for the sums of the degrees of natural numbers:

In [7]: =

jacob-bernoulli-legacy_18.png

In [8]: =

jacob-bernoulli-legacy_19.png

Out [8] =

jacob-bernoulli-legacy_20.png

In [9]: =

jacob-bernoulli-legacy_21.png

Out [9] =

jacob-bernoulli-legacy_22.png

In [10]: =

jacob-bernoulli-legacy_23.png

Out [10] =

jacob-bernoulli-legacy_24.png

Solving the resulting system of equations, we get:

In [11]: =

jacob-bernoulli-legacy_25.png

Out [11] =

jacob-bernoulli-legacy_26.png

Bernoulli wrote that “Anyone who has carefully studied the obtained sequence can continue the Table further without any additional calculations ”, noting that:

jacob-bernoulli-legacy_27.png

He noted that the coefficients jacob-bernoulli-legacy_28.pngare independent of n , and can be calculated recursively by substituting n == 1 in the equation above.

In [12]: =

jacob-bernoulli-legacy_29.png

Out [12] =

jacob-bernoulli-legacy_30.png

These coefficients are the well-known Bernoulli numbers that have found their application in many areas of mathematics [for example, see the discussion Why do Bernoulli numbers arise everywhere?(Why are Bernoulli numbers appearing everywhere?) On mathoverflow.net]:

In [13]: =

jacob-bernoulli-legacy_31.png

Out [13] =

jacob-bernoulli-legacy_32.png

In the second part of his book, Bernoulli calculates the number of possible permutations, the number of permutations in a set with repeating elements, the number of ways to select given objects from the set, etc., which he later uses to calculate probability, as the ratio of the number of favorable events to the total possible number of events.

In the third part, Bernoulli applies the results obtained in the previous two parts to the solution of 24 problems related to gambling. The leitmotif of all these tasks is the sequence of independent results 0 and 1, which is called the “Bernoulli process”. I think that the 360th anniversary of the birth of Jacob Bernoulli is an excellent occasion to solve his problems in Mathematica using the Wolfram Language.

For example, in task 9, it is required to find the expected win in a game of three players. Players alternately take cards (without replacement and return) from the deck of 20 cards, while 10 of them are curly. When the cards run out, the winnings are distributed evenly among those players who have more curly cards.

Put c1 , c2, and c3 is the number of figure cards for each player, then the winning share of the first player will be:

In [14]: =

jacob-bernoulli-legacy_33.png

Assume that after a deck of 20 cards was thus distributed between the players, it turns out that the first and second they have 7 cards each, and the third one has 6. The final distribution vector of curly cards between players has a multidimensional hypergeometric distribution, which is set in the Wolfram Language function MultivariateHypergeometricDistribution :

In [15]: =

jacob-bernoulli-legacy_34.png

In [16]: =

jacob-bernoulli-legacy_35.png

Out [16] =

jacob-bernoulli-legacy_36.png

In [ 17]: =

jacob-bernoulli-legacy_37.png

Out [17] =

jacob-bernoulli-legacy_38.png

This and other tasks are considered and solved in the attached document (in English).

In the final part of the treatiseArs Conjectandi discusses the use of probability theory in solving civil, moral and economic issues. In this part, Bernoulli argues that probability theory reflects our incomplete knowledge of the state of the world, and, unlike gambling, where probability can be determined by finding the ratio of the number of favorable outcomes of some experience to their total possible number, probability in “real” life is not can be installed a priori. Bernoulli argues that these unknown probabilities can be calculated based on past results.

He proved the weak law of large numbers, which states that the observed success rate in a series of n independent trials, the probability of success in each of which is equal to p, will infinitely approach p with an unlimited increase in the number of trials. Thus, we can estimate the probability with arbitrary accuracy by taking a sufficient number of tests. Thus, for any δ and e , there exists a number n (number of tests) that

jacob-bernoulli-legacy_39.png

In [18]: =

jacob-bernoulli-legacy_40.png

Out [18] =

jacob-bernoulli-legacy_41.png

Demonstration of " Imitation of a coin flip, and the law of large numbers of experiment " ( Simulated Coin Tossing Experiments and the Law of Large Numbers ), created by Ian McLeod for the Wolfram Demonstrations Project, in particular, demonstrates this convergence process.

Resources for learning Wolfram Language (Mathematica) in Russian: habrahabr.ru/post/244451

Also popular now: