Dwie kule w Kalifornii i wielebny Thomas Bayes

Wstępniak video na You Tube

Kontynuuję moją wycieczkę pokazową po krainie na granicy matematyki i codzienności. Tym razem chcę omówić nieco obszerniej podstawy czegoś, czym wykładowcy straszą (czasami) studentów na zajęciach z podstaw statystyki. „Myślicie, że te podstawy są trudne ? To poczekajcie, aż zaczniecie się uczyć statystyki Bayesowskiej: to dopiero jest trudne”. Chcę przybliżyć moim czytelnikom podstawy właśnie tego straszaka, czyli statystyki Bayesowskiej.

Aha, no tak. We wcześniejszych wpisach zapowiadałem, że będę omawiał sposób, w jaki podstawowe twierdzenia nauk społecznych można zastosować w praktyce. Przyjrzeliśmy się już dwóm takim twierdzeniom. Pierwsze, całkiem banalnie mówi: jesteśmy zbiorowością (patrz „Gra w tożsamość”). Drugie postuluje, że prawie wszystko co robimy, robimy w sposób powtarzalny, według powtarzalnych wzorców, a każdy taki wzorzec można rozpisać jako sekwencję (patrz „Czasami coś odrasta”). Pora na trzecie: powtarzalne wzorce zachowań tworzymy poprzez uczenie się na kolejnych eksperymentach.

Wszystko zaczęło się w roku 1763 roku, chociaż może nieco wcześniej. W dniu 23 grudnia 1763 pan John Canton, redaktor czasopisma „Philosophical Transactions”, wydawanego nakładem Królewskiego Towarzystwa Naukowego, otrzymał list od pana Richarda Price’a (nie mylić ze współcześnie żyjącym pisarzem o dokładnie tym samym imieniu i nazwisku), buntowniczego kaznodziei związanego z architektami amerykańskiej niepodległości, podobno głównie Benjaminem Franklinem. List był wysłany 10 listopada 1763 roku i rekomendował panu Johnowi Cantonowi, jako materiał na artykuł, esej napisany (podobno) przez nieżyjącego już wówczas przyjaciela Richarda Price’a, wielebnego Thomasa Bayesa. Price twierdził, że wypełniając ostatnią wolę nieżyjącego Bayesa, porządkował jego osobiste dokumenty i znalazł wśród nich właśnie ten. Redaktor John Canton musiał być pod sporym wrażeniem nadesłanego tekstu, ponieważ ukazał się on jeszcze w tym samym, 1763 roku, którego zostało wtedy tylko 7 dni, pod tytułem: „An Essay towards Solving a Problem in the Doctrine of Chances[1].

Oto jak Richard Price przedstawiał w swym liście do Johna Cantona główną myśl Thomasa Bayesa: „[…] Jego zamiarem było znaleźć metodę, poprzez którą moglibyśmy wydać osąd na temat prawdopodobieństwa że jakieś zdarzenie będzie miało miejsce, w danych okolicznościach, w oparciu o supozycję że nie wiemy nic poza tym, że w takich samych okolicznościach wydarzyło się to już pewną liczbę razy i nie powiodło się w jakiejś innej liczbie razy. […] Dodaje on, że nie jest trudno to wyliczyć, pod warunkiem posiadania jakiejś reguły dla oszacowania szans, że prawdopodobieństwo zdarzenia doskonale nam nieznanego mieści się między jakimikolwiek znanymi stopniami prawdopodobieństwa, jeszcze przed wykonaniem jakichkolwiek eksperymentów […]”.

Richard Price przedstawił redaktorowi Johnowi Cantonowi myśl swojego przyjaciela z prawie doskonałą wiernością. Prawie, gdyż Thomas Bayes wprowadzał jednak element eksperymentu w swoim modelu matematycznym. W celu wyjaśnienia logiki tego eksperymentu i jego związku z całą przedstawianą tu teorią, poniżej przedstawiam moją własną reprodukcję tzw. prostokąta Bayesa. Narysowałem go tak wiernie w stosunku do oryginału z 1763 roku, jak tylko mogłem. Na razie oznaczenia prostokąta niewiele Wam powiedzą, ale wyjaśniam je dalej pod rysunkiem. W moich wyjaśnieniach staram się streścić i odtworzyć oryginalny wywód Thomasa Bayesa też tak wiernie, jak to możliwe.

Prostokąt Bayesa

Wyobraźmy sobie, że wszystko co może się wydarzyć przedstawiamy jako płaszczyznę, a dokładnie jako skończony prostokąt ABCD wyznaczony na dwuwymiarowej płaszczyźnie; podobne geometryczne podejście jak w przypadku rozkładu normalnego ( patrz „Czasami coś odrasta” ). Wyobraźmy sobie, że mamy dwie kule: W i O. Stajemy twarzą do naszego prostokąta tak, że bok AB jest przed nami, jak rozciągnięta poprzecznie linka. W sumie tyłem też można stanąć, ale wtedy trzeba rzucać przez ramię; matematycznie nie ma to większego znaczenia. Najpierw rzucamy kulą W. Nie musimy jej nadawać żadnego konkretnego celu: po prostu staramy się, żeby potoczyła się po prostokącie ABCD. Trajektorię, jaką pokonała nasza kula W, oznaczamy jako odcinek oS.

Teraz rzucamy kulą O, ale przed rzutem zastanawiamy się, gdzie może trafić w nasz prostokąt ABCD. Pierwsza możliwa odpowiedź brzmi: gdziekolwiek. Druga, alternatywna odpowiedź brzmi jednak: albo w prostokąt oBCS, albo w przyległy do niego prostokąt AoSD. Rozumiecie ? Pierwszy rzut – kulą W – podzielił nam całą przestrzeń możliwych zdarzeń na dwie części. Pytanie o to, co się stanie następnie można uprościć: albo walnie w jedną część przestrzeni, albo w drugą. Sukces albo porażka.

Geometria ma swoje prawa: prawa proporcji. Kiedy już rzuciliśmy kulą W i podzieliliśmy w ten sposób nasz prostokąt ABCD na dwa mniejsze – oBCS oraz AoSD – prawdopodobieństwo że kolejny rzut kulą O trafi w któryś z nich jest zależny od ich powierzchni. Im większy jest prostokąt oBCS w stosunku do macierzystego ABCD, tym większa szansa że kula O trafi właśnie w niego. Ponieważ to są prostokąty, naszą proporcję prawdopodobieństwa można nawet jeszcze bardziej uprościć: prawdopodobieństwo trafienia w prostokąt oBCS jest takie, jak proporcja długości odcinka oB do długości odcinka AB. Genialnie proste.

W ten sposób działa nasz umysł. Wchodzimy na nieznany teren, na przykład do nowego biznesu albo zaczynamy nową pracę. Najpierw określamy granice, w których cokolwiek może się wydarzyć, czyli prostokąt ABCD. Następnie zaczynamy eksperymentować: rzucamy kulą W. Próbujemy nawiązać pierwsze kontakty, przeprowadzić pierwsze własne pomysły itd. Każda kolejna taka próba jest jak rozpoczynany wciąż na nowo eksperyment Bayesa. Rzut kulą W dzieli nam przestrzeń wszystkiego, co się może zdarzyć na dwie kategorie: sukces albo porażkę.

W ten sposób jednostki i zbiorowości uczą się nowych wzorców zachowań. Coś robimy. Spośród wszystkiego co się może zdarzyć, to co robimy trafia albo w prostokąt oBCS (sukces, dostajemy efekty, których oczekiwaliśmy po naszym działaniu) albo w AoSD (porażka, czyli kicha, czyli nam nie wyszło). Sekwencja sukcesów utwierdza nas w przekonaniu, że nasze działanie ma sens i z każdym sukcesem utrwalamy odpowiedni wzorzec zachowań. Sekwencja porażek skłania do refleksji, że w naszym doskonałym planie być może powinniśmy wnieść drobne korekty i następnie próbujemy znowu. Jeżeli w całkowitym zbiorze n prób będziemy mieli większość sukcesów, utrwalimy nasze wzorce zachowań. W teorii uczenia się jest to określane jako wykształcanie świadomej kompetencji. Jeżeli natomiast w sekwencji n prób mamy większość porażek, wtedy będziemy mnożyć wciąż nowe warianty zachowań i sprawdzać, który przynosi efekty. Takie zjawisko jest z kolei określane jako budowanie świadomej niekompetencji, czyli budowanie wiedzy na temat tego, kiedy nam nie wychodzi.

Sformalizujmy nieco to rozumowanie. Jeżeli na 10 prób mamy 70% prawdopodobieństwo ośmiu sukcesów i 2 porażek, całe nasze zachowanie będzie szło w kierunku utrwalania obecnie rozgrywanych strategii i kształtowania świadomej kompetencji. Jeżeli natomiast będziemy mieli 70% szans na 8 porażek i 2 sukcesy, nasze działania będą szły w kierunku budowania świadomej niekompetencji i szukania nowych rozwiązań. Prawdopodobieństwo, które starał się wyliczyć wielebny Thomas Bayes – prawdopodobieństwo p sukcesów na n prób – to obiektywny stan rzeczywistości, który nadaje kierunek naszym procesom uczenia się.

Wracam do kwestii proporcji. Przypuśćmy, że nasz pierwszy rzut kulą W wyjdzie prawie dokładnie pośrodku prostokąta ABCD. Wtedy proporcja pomiędzy odcinkiem oB i całym bokiem AB będzie bliska 50%. Prawdopodobieństwo sukcesu w kolejnym rzucie, tym kulą O, jest również bliskie 50%. Prawdopodobieństwo, że sekwencja kolejnych rzutów kulą O będzie sekwencją sukcesów, która utrwali nasz wzorzec zachowań, jest prawie równe prawdopodobieństwu, że będzie to sekwencja porażek i skłoni nas do poszukiwania wciąż nowych rozwiązań.

Nooo, nareszcie ! Pierwsza praktyczna wskazówka od wielebnego Bayesa ! Jeżeli nasz system wartości jest wyostrzony, tzn. bardzo jasno określa czego chcemy i co określamy jako sukces – czyli nasz prostokąt oBCS jest wyraźnie większy albo wyraźnie mniejszy od AoSD – wtedy potrafimy świadomie zbudować wyraźne rozróżnienie między doświadczalnym uczeniem się skierowanym na utrwalanie naszych wzorców zachowań, a uczeniem się ukierunkowanym na szukanie czegoś nowego. Jeżeli natomiast nasz system wartości jest taki cośkolwiek nijaki i nie wiemy dokładnie, na czym nam zależy, wtedy trudno jest nam określić czy lepiej utrwalać to, co już robimy czy też może szukać nowych rozwiązań. Czyli, tak po ludzku, jak wiemy czego chcemy to uczymy się szybciej, a jak nie wiemy, to wolniej.

Druga praktyczna wskazówka, taka na wielkie okazje: nasz system wartości jest określony przez nasze doświadczenie. Zawsze gdzieś tam u zarania i w kolebce zdarzeń był ten rzut kulą W, który podzielił prostokąt naszej rzeczywistości na dwie kategorie. Czasami warto się zastanowić, szczególnie kiedy czujemy że coś jest naprawdę nie tak, czy przypadkiem nie byłoby warto zainicjować nowej sekwencji i rzucić tą kulą W po raz kolejny.

No dobra, no to jakie jest w końcu to prawdopodobieństwo p sukcesów na n prób ? Thomas Bayes podszedł do tego w sposób, który dzisiaj znamy jako rozkład dwumianowy. Nie byłbym belfrem z krwi i kości, gdybym teraz nie zrobił na ten temat szczegółowego wykładu. Mamy prawdopodobieństwo sukcesu a, że nasza kula O walnie w jeden prostokąt wykreślony przez uprzedni rzut kulą W) oraz prawdopodobieństwo porażki b, czyli że kula O trafi niezupełnie w ten właśnie prostokąt. Mamy n prób, gdzie oczekujemy p sukcesów oraz q = n – p porażek. Z tych zmiennych robimy dwumian Newtona: (a + b)p + q.

Jeżeli ulegniemy pokusie dodawania w nawiasie, czyli jeżeli dodamy a + b, wtedy wyjdzie nam 1 – czyli 100% – i to samo wyjdzie nam po podniesieniu do jakiejkolwiek potęgi. Jeżeli jednak zachowamy się zgodnie z logiką dwumianu Newtona, to otrzymamy wielomian, gdzie jednym ze składników będzie: {n!/[p!(n-p)!]}*ap*bq. Ten właśnie składnik wielomianu jest prawdopodobieństwem otrzymania p sukcesów w n próbach. W składniku tym mamy dwa odrębne czynniki. Z jednej strony mamy czynnik ap*bq , czyli ściśle pojęte prawdopodobieństwo że zdarzy się p sukcesów i q porażek. Drugi czynnik to raczej współczynnik – tzw. współczynnik wielomianu – czyli {n!/[p!(n-p)!]}, który odzwierciedla liczbę możliwych sposobów, na które możemy mieć p sukcesów i q porażek na n prób.

Ten drugi czynnik, czyli {n!/[p!(n-p)!]}, ma ciekawą własność. Wyobraźmy sobie, że mamy 100 prób, czyli n = 100 oraz że chcemy sprawdzić prawdopodobieństwo osiągnięcia 33 sukcesów i 67 porażek. Wyrażenie {n!/[p!(n-p)!]} daje nam wtedy wynik 294 692 427 022 540 894 366 527 900 sposobów wystąpienia takiej kombinacji. Strasznie dużo. Co ciekawe, tyle samo, co liczba możliwych kombinacji 67 sukcesów i 33 porażek. Teraz chcę 58 sukcesów na 100 prób. Wyrażenie {n!/[p!(n-p)!]} jest wtedy równe 28 258 808 871 162 574 166 368 460 400. Jeszcze bardziej strasznie dużo, dokładnie dwa rzędy wielkości więcej co poprzednie strasznie dużo. Jeżeli mogę zadowolić się tylko 3 sukcesami, mogę je otrzymać w 100 próbach na {n!/[p!(n-p)!]} = 161 700 sposobów, tyle samo zresztą co 97 sukcesów na 100 prób. Ciągle dużo ale już nie tak strasznie dużo.

Rozwijam teraz dalej myśl, że teoria Thomasa Bayesa odzwierciedla nasze procesy uczenia się poprzez eksperymentowanie. Powyższy pokaz obliczeniowy wskazuje na ciekawą własność tego procesu. Proces eksperymentowania i uczenia się, gdzie liczba sukcesów jest zbliżona do liczby porażek, czyli gdzie utrwalanie wzorców zachowań (rozwijanie świadomej kompetencji) jest mniej więcej zrównoważone z szukaniem nowych rozwiązań (rozwijaniem świadomej niekompetencji) może się wydarzyć na więcej możliwych sposobów niż procesy skrajne, gdzie mamy albo prawie wyłącznie porażki (prawie wyłącznie uczymy się, co nam nie wychodzi) albo prawie same sukcesy i pracowicie utwierdzamy się w doskonałości naszych metod działania.

To wydarzyło się pod koniec 1763 roku. Inna ciekawa rzecz wydarzyła się całkiem niedawno. W dniu 10 sierpnia 2018 roku gubernator stanu Kalifornia podpisał i przekazał Sekretarzowi Stanu akt prawa stanowego, nakreślający plan dla przejścia gospodarki całego stanu Kalifornia w 100% na energie odnawialne[1]. Temat energii odnawialnych jest drogi mojemu sercu, prowadzę na ten temat badania i staram się tworzyć koncepcje biznesów dla rozwoju energii odnawialnych. Teraz staram się wykorzystać ten konkretny przypadek dla zilustrowania zasad racjonalnego eksperymentowania zgodnie z filozofią matematyczną Thomasa Bayesa. Tak jest, wezmę artykuł napisany w osiemnastym wieku i zastosuję jego założenia teoretyczne do interpretacji działań podejmowanych przez stan Kalifornia dla przejścia na energie odnawialne, w dwudziestym pierwszym wieku.

We wstępie owej kalifornijskiej ustawy możemy się dowiedzieć, iż przed jej uchwaleniem niejaka PUC, czyli Public Utilities Commission, czyli po naszemu Komisja ds. Infrastruktury Publicznej, miała prawo egzekwować od wszystkich detalicznych dostawców energii elektrycznej aby w ich koszyku dostaw energie odnawialne miały następujący udział: 25% w dniu 31 grudnia 2016, 33% w dniu 31 grudnia 2020, 40% dnia 31 grudnia 2024, 45% trzydziestego pierwszego grudnia 2027 oraz 50% w dniu 31 grudnia 2030. Tenże sam wstęp oznajmia, że stan (Kalifornia) wziął i się zastanowił i stwierdził, że jak się da tyle, to pewnie da się i więcej, no i zrewidowano podanej powyżej progi. Teraz postanawia się, że trzydziestego pierwszego grudnia 2024 roku elektryczność ze źródeł odnawialnych ma stanowić 44% sprzedaży detalicznej i ma to podskoczyć do 52% w dniu 31 grudnia 2027, aby osiągnąć 60% w dniu 31 grudnia 2030 roku.

Jestem ekonomistą, więc lubię wykresy. Poniżej, możecie zobaczyć tą zmianę polityki energetycznej właśnie w postaci wykresu.

Ustawowe cele stanu Kalifornia w zakresie udziału energii odnawialnych w detalicznej sprzedaży elektryczności

Pytanie nr 1: w jaki sposób cały stan – w zasadzie cały kraj, bo Kalifornia jest ludnościowo większa od Polski – może takie progi jak wymienione powyżej ustalić w sposób racjonalny i realistyczny ? Pytanie nr 2: skąd cały taki kraj wie, że można te progi podnieść ?

Przypuśćmy, że każdy z Was, moi czytelnicy, chce takie wyliczenia przeprowadzić. Skąd wiadomo, jaki procent energii odnawialnych można wyznaczyć jako cel na przyszłość dla społeczności liczącej sobie ponad 30 milionów ludzi ? Wiadomo, czego nie mamy:  nie mamy żadnej reprezentatywnej próbki wielodziesięciomilionowych populacji wraz z ich proporcjami elektryczności dostarczanej ze źródeł odnawialnych. Na tym poziomie analizy nie mamy więc podstaw do rozumowania w kategoriach typowego rozkładu statystycznego ( patrz „Czasami coś odrasta” ). Jak więc podejść do sprawy racjonalnie i wyznaczyć cele, które mają szanse być zrealizowane ?

Politycznie najprościej jest wyznaczyć takie cele, o których wiemy na pewno że zostaną zrealizowane. Jako prawodawca mamy więc przed sobą twarde prognozy, że w roku 2024 odsetek energii odnawialnych wyniesie 46 – 48% i do ustawy wpisujemy 44% itd. Jeżeli jednak myślimy nieco bardziej ambitnie i chcemy stworzyć rzeczywistą strategię przejścia, trzeba zapuścić się w krainę ryzyka i przybić jakiś zakład z losem.

No dobra, ale miało być też o Kalifornii i o jej przejściu na energie odnawialne. W zasadzie wszędzie na świecie przejście to ma szczególną postać, odmienną od tego co działo się jakieś 100 – 150 lat temu, kiedy z kolei przestawialiśmy się na energię z paliw kopalnych. Wtedy, w przeszłości, węgiel, gaz czy ropa naftowa zastępowały młyny wodne czy wiatrowe, tudzież domowe piece, w postaci wielkich skoków. Otwierała się nowa duża elektrownia i za jednym zamachem „przestawiała” na paliwa kopalne całe duże społeczności. Z energiami odnawialnymi jest przeciwnie. Z wyjątkiem niektórych miejsc na świecie (np. kompleksu słoneczno-cieplnego Ouarzazate w Maroku), energie odnawialne pojawiają się w postaci stosunkowo niewielkich, lokalnych instalacji. Przejście na energie odnawialne to stopniowe przechodzenie lokalnych społeczności na „paczki” energii pochodzącej z wody, wiatru czy słońca.

Mamy tu do czynienia z procesem zbiorowego uczenia się. Najpierw zbiorowość rzuca kulą W, jak u Bayesa i jest to zresztą rzut wielokrotny. Zaczyna się od niewielkiej liczby lokalnych instalacji opartych na energiach odnawialnych. Przedsięwzięcia te są eksperymentem, który daje wiedzę na temat tego, co można uznać za sukces ekonomiczny i technologiczny, a co jest porażką. Każde kolejne przedsięwzięcie, spośród tych pionierskich, dostarcza nowych informacji. Przychodzi moment, kiedy „sukces” i „porażka” są na tyle ściśle zdefiniowane, że można pokusić się o określenie ich prawdopodobieństwa.

Według danych udostępnianych przez U.S. Energy Information Administration, przeciętny mieszkaniec Kalifornii zużywa rocznie 199 milionów Btu (British Thermal Units) energii, czyli ok. 58 321 kilowatogodzin. Ludność Kalifornii, zgodnie z danymi World Population Review, to obecnie  39 776 830 osób. Jeżeli strukturę rynku energii w Kalifornii wyrażamy w procentach, to dzielimy ten rynek na „paczki”, z których każda równa jest 1% tegoż rynku, czyli jest to 1% * 39 776 830 osób * 58 321 kilowatogodzin =  23 198 301 877,32 kilowatogodzin = 23 198,3 gigawatogodzin. Jeżeli ustawa zakłada, że

Wskaźniki procentowe zawarte w cytowanej tu ustawie Parlamentu Stanu Kalifornia można zinterpretować jako miary prawdopodobieństwa. Jest to prawdopodobieństwo, że losowo wybrana „paczka” energii równa 23 gigawatogodziny z groszami wyląduje w prostokącie „energie odnawialne” a nie w prostokącie „energia z paliw kopalnych”. Innymi słowy, zbiorowość stanu Kalifornia rzuca już drugą kulą, czyli kulą O. W ustawie jest wpisane założenie, że prawdopodobieństwo to będzie rosło w czasie. Założenie to jest nawet wzmocnione przez fakt, że najnowszy tekst tych przepisów zakłada wyższe prawdopodobieństwo niż poprzednia wersja. Zgodnie z filozofią matematyczną Bayesa jest tylko jeden sposób, aby to prawdopodobieństwo wzrosło: prostokąt odpowiadający kategorii „sukces w eksploatacji energii odnawialnych” musi być coraz większy w relacji do całkowitych rozmiarów prostokąta ABCD, czyli całego uniwersum zdarzeń. Innymi słowy, definicja sukcesu musi być coraz bardziej pojemna.

Jest jeszcze drugi poziom logiczny w tym rozumowaniu. Pamiętacie wyliczenia współczynnika wielomianu sprzed kilku akapitów ?No wiecie, tego {n!/[p!(n-p)!]}. Pokazałem wtedy wyliczenia dla 100 prób, a więc tak jakby pokazywał je dla 100 paczek energii, z których każda ma te tam 23 gigawatogodziny z lekkim hakiem, w sensie że w Kalifornii, bo u nas w Polsce to taka paczka miałaby jakieś 11 gigawatogodzin. Oni zużywają więcej energii na transport i na klimatyzację. W każdym razie, logika rachunku dwumianowego, opartego na rozumowaniu Thomasa Bayesa sugeruje, że istnieje 100 891 344 545 564 193 334 812 497 256 sposobów uzyskiwania ze źródeł odnawialnych 50 paczek energii na 100 możliwych. To był kiedyś wyznaczony cel dla Kalifornii na rok 2030. Jest to jednocześnie największa możliwa liczba kombinacji sukcesów i porażek w 100 próbach. Innymi słowy, jest to proces uczenia się o największym potencjale przynoszenia informacji z kolejnych eksperymentów. Teraz, od 10 września, ten cel został zrewidowany do 60%, a więc do 60 paczek energii na 100 możliwych. Jest 13 746 234 145 802 811 501 267 369 720 sposobów uzyskania 60 sukcesów na 100 prób. To jest ponad siedem razy mniej niż w przypadku 50 sukcesów. Nowe ustawodawstwo stanu Kalifornia przesunęło moment maksymalnie efektywnego, zbiorowego uczenia się wstecz w czasie, z roku 2030 na moment gdzieś między rokiem 2024 a 2027. Ciekawe.

[1] Senate Bill No. 100, CHAPTER 312, An act to amend Sections 399.11, 399.15, and 399.30 of, and to add Section 454.53 to, the Public Utilities Code, relating to energy. [Approved by Governor September 10, 2018. Filed with Secretary of State September 10, 2018.]

 

[1] „An Essay towards Solving a Problem in the Doctrine of Chances”. By the Late Rev. Mr.Bayes, F. R. S. Communicated by Mr. Price, in a Letter to John Canton, A. M. F. R. S. ; Author(s): Mr. Bayes and Mr. Price; Source: Philosophical Transactions (1683-1775), Vol. 53 (1763), pp. 370-418. Published by: Royal Society; Stable URL: http://www.jstor.org/stable/105741

 

Czasami coś odrasta

 

Zastanawiam się – dalej się zastanawiam – nad tym, jak wydobyć maksymalną wartość dodaną z nauczania, jakie serwuję moim studentom. W języku polskim nauczam przede wszystkim podstaw zarządzania, mikroekonomii oraz budowania biznes planu, także w kontekście wdrażania nowych technologii. Mam taką małą obsesję na temat nauczania nauk społecznych: postrzegam je trochę w taki sposób, w jaki stulecia temu postrzegano astronomię, czyli jako dyscyplinę nauki służącą do określenia swojej pozycji na jakimś terytorium i do nakreślenia mapy tego terytorium. To trochę jak te programy w stylu „Szkoła przetrwania”: zrzucają Cię, czasami nawet na spadochronie (czasami bez) w środku czegoś, co tylko przez grzeczność określasz jako „dziką przyrodę” raczej niż „zadupie” i masz znaleźć drogę do wyznaczonego punktu ponownego kontaktu z tym, co zwykłeś uważać za cywilizację.

Nawiązuję w ten sposób do mojego poprzedniego wpisu, pod tytułem „Gra w tożsamość”. Szukam takich twierdzeń i teorii w naukach społecznych, które są solidnie potwierdzone badaniami empirycznymi – a więc zasługują na miano prawd naukowych – a jednocześnie są przydatne w codziennym życiu. W „Grze w tożsamość” rozwinąłem krótkie rozumowanie na temat jednej z takich podstawowych prawd naukowych: faktu, że jesteśmy istotami społecznymi. Teraz chcę się skupić na czymś innym i jednocześnie pokrewnym: prawie wszystko co robimy, robimy w sposób powtarzalny, według powtarzalnych wzorców, a każdy taki wzorzec można rozpisać jako sekwencję.

Na początek trochę praktycznych przykładów, tak tylko żeby szybko nakreślić o co mi chodzi. Powiedzmy, że zaczynamy nowy biznes, np. internetowy sklep z odzieżą. Staramy się sprofilować potencjalnych klientów. Kiedy po raz pierwszy zadajemy sobie pytanie: „Jak może podejmować decyzję nasz klient?”, odruchowa odpowiedź brzmi często „Nie mam pojęcia, oni są tacy różnorodni”. Otóż nie. Jedna z solidnych, teoretycznych zdobyczy nauk społecznych to stanowcze stwierdzenie, że nasi klienci będą się zachowywać według przewidywalnych wzorców. Marketing opiera się na identyfikacji tych wzorców.

Powiedzmy, że jesteśmy kimś ważnym w państwie ( np. doradcą asystenta wiceprzewodniczącego komitetu politycznego przy kimś, kto na skutek niezręcznego zbiegu okoliczności tylko firmuje nas swoim nazwiskiem ) i uczestniczymy – naprawdę uczestniczymy – w negocjacjach na temat jakiegoś ważnego traktatu międzynarodowego. Sytuacja bywa napięta i mamy skłonność do traktowania innych stron negocjacji jako nieodgadnionych pokerzystów, którzy mogą w każdej chwili nas czymś zaskoczyć. Otóż znowu: nie. Państwa, tak samo jak ludzie, działają według powtarzalnych wzorców. Rzeczywisty margines manewru Waszych partnerów negocjacyjnych naprawdę nie jest znacząco odmienny od Waszego.

Pora na poważniejszą teorię. Zacznę od matematyki, a dokładnie od rachunku prawdopodobieństwa. Wiem, jak zaczynam od matmy, to wielu z Was może spontanicznie zamknąć tą stronę. Wiem, wielu z Was czuje instynktowną niemal odrazę do matematyki. Ja też ją kiedyś czułem. Wobec chyba wszystkich z nas, kiedy byliśmy dziećmi, zastosowano zabieg intelektualnego okaleczenia polegający na rozpoczęciu nauki matematyki od wkuwania na pamięć tabliczki mnożenia.

Mogę Was pocieszyć: czasami, nawet po okaleczeniu, coś odrasta. Mnie odrosła ciekawość matematyczna, tzn. intuicyjne przeświadczenie, że matematyka odzwierciedla strukturę rzeczywistości. Wam też może odrosnąć. Odwagi. Jedną z rzeczy, które wkuwamy na matmie w szkole jest pojęcie średniej arytmetycznej. Dlaczego?

Siedemnasty i osiemnasty wiek w Europie były okresem fascynacji matematyką i z czasem ta fascynacja przerodziła się w praktyczne zastosowanie. Pytanie „Co może się wydarzyć ?” było jednym z podstawowych, na które matematyka próbowała znaleźć odpowiedź. Na przełomie XVII i XVIII wieku, Isaac Newton oraz Gottfried Wilhelm Leibniz wytyczyli pierwszą ścieżkę odpowiedzi na to pytanie, kładąc podwaliny pod dziedzinę matematyki, którą znamy dzisiaj jako analizę matematyczną. Ich głównym odkryciem było stwierdzenie, że kiedy rzeczy się zmieniają, to zmieniają się w kierunku określonym przez zależności z innymi rzeczami, czyli według określonej funkcji.

Jednym z badaczy, którzy podjęli ten temat był o jedno pokolenie starszy od Newtona Abraham de Moivre. W swoim dziele pt. „The Doctrine of Chances”, w 1738 roku (następnie w 1756) wyłożył następującą teorię, potwierdzoną zresztą żmudnymi badaniami empirycznymi: jeżeli mamy jakieś zjawisko, które można zmierzyć, to przy dużej liczbie możliwych zdarzeń tego zjawiska najczęściej będzie się powtarzać wartość równa średniej arytmetycznej, czyli sumie wszystkich zaobserwowanych wartości podzielonej przez liczbę obserwacji.

Zastanówmy się nad tym chwilę. Jeżeli mam ten sklep internetowy z odzieżą i zastanawiam się, jaki typowy budżet moi klienci wydadzą na zakupy, to zgodnie z teorią de Moivre’a mam prawo oczekiwać, że będzie to średnia arytmetyczna, czyli suma wszystkich indywidualnych budżetów podzielona przez liczbę klientów. Mniej więcej w tym kierunku poszły badania i odkrycia Adama Smitha, jednego z ojców założycieli ekonomii. Odkrył, że ceny wielu dóbr, zwłaszcza tych o podstawowym znaczeniu dla społeczeństwa (np. ceny zboża albo cena pieniądza czyli stopa procentowa), zmieniają się według możliwych do przewidzenia trajektorii oraz że w danym miejscu i czasie przyjmują najczęściej wartości bliskie średniej arytmetycznej.

Teoria de Moivre’a dała początek założeniu, które z kolei wkuwamy na zajęciach ze statystyki, ze tzw. wartością oczekiwaną w zbiorze obserwacji jest średnia arytmetyczna. Z jednej strony zachęciło to późniejszych badaczy, po de Moivrze, do eksploracji okolic tej średniej arytmetycznej i do opisu całej struktury rzeczywistości dookoła. W tym kierunku poszedł Carl Friedrich Gauss, którego odkrycia pozwalają nam dzisiaj stosować tzw. rozkład normalny, zwany pieszczotliwie krzywą Gaussa.

Z drugiej jednak strony pojawiły się pytania o to, co robić, kiedy nie mamy warunków do wykonania np. 2000 prób i do określenia średniej arytmetycznej. Trudno może być znaleźć chociażby samą tylko metodę dla wyliczenia średniej np. z czasu, jakiego potrzebuje do namysłu gracz po drugiej stronie pokerowego stołu. Czasami w życiu bywa tak, że mamy niewiele prób. Warto mieć jednak metodę oswojenia niepewności i na taką okoliczność. Jednym z pierwszych teoretyków, którzy poszli tą ścieżką był wielebny Thomas Bayes, którego tajemniczy skądinąd esej, opublikowany post mortem oraz intepretowany czasami jako poszukiwanie dowodu na istnienie Boga, stworzył fundamenty dla tego, co dzisiaj określamy jako statystykę Bayesowską. W ślady Bayesa poszli inni i w ten sposób (prawdopodobnie) narodziła się teoria gier.

Gauss i Bayes to dwie różne metody określenia powtarzalnych wzorców w zachowaniu ludzi. Zgodnie z moim podejściem do dydaktyki nauk społecznych są to dwie różne metody znajdowania własnej drogi w złożonej rzeczywistości społecznej. Idąc w ślady Gaussa, staramy się odtworzyć strukturę rzeczywistości ujętą w liczbach. Podążając z kolei śladami Thomasa Bayesa, racjonalnie eksperymentujemy i stopniowo redukujemy niepewność poprzez interpretację wyników kolejnych eksperymentów.

Przyjrzyjmy się bliżej tym dwóm ścieżkom rozumowania oraz ich praktycznemu zastosowaniu. Mówiąc najprościej, każda z nich pasuje do innego typu sytuacji. Rozumowanie de Moivre’a i Gaussa pasuje do okoliczności, kiedy w zasięgu ręki mamy dużo informacji, czasami tak dużo iż mamy wrażenie nadmiaru. Powtarzalne wzorce w zachowaniu ludzi odtwarzamy, znajdując porządek ukryty w natłoku informacji. Bywa jednak i tak, że informacja jest skąpa, a przynajmniej takie mamy wrażenie. Potrzebujemy wtedy metody, która działałaby w pewnym sensie odwrotnie do „ilościówki” de Moivre’a. Potrzebujemy czegoś, co wyciśnie informacje i pozwoli nam wyrobić sobie zdanie na temat powtarzalnych zachowań ludzi tam, gdzie pozornie takich informacji nie ma.

Zanim przejdę do uczonego wykładu, mała dygresja. Po jaką ciężką cholerę zajmować się tym, co napisał jakiś gość dwieście z górą lat temu ? Co, nie mamy świeższej bibliografii ? Jasne, że mamy. Zachęcam, aby się z nią zapoznawać na bieżąco. Mam jednakowoż takie osobiste przekonanie, zbieżne z filozofią hermeneutyczną: jakiejkolwiek historii bym nie opowiadał, koniec końców opowiadam historię mojej własnej egzystencji. Opowiadam kontekst, w takim moja historia powstała. Teoretycy z osiemnastego wieku opowiadali historię społeczeństwa, które mniej więcej od połowy siedemnastego wieku stopniowo odkrywało zastosowania matematyki. To były czasy, kiedy akuratne obliczenia miały strategiczne znaczenie: w kartografii, w ekonomii (która jeszcze wtedy nie miała pojęcia, że nazywa się „ekonomia”), w architekturze, w wojskowości itd. Europa odkrywała wtedy całą potęgę informacji ujętych w liczby. Brzmi znajomo ? Ludzie tamtych czasów starali się znaleźć powtarzalne wzorce w sytuacjach, kiedy nagle mieli do dyspozycji nowe narzędzia ich zbierania, tak jak my dzisiaj. Książka de Moivre’a czy też esej Bayesa, pod powierzchnią rozważań teoretycznych, opowiadają taką właśnie historię. No i przy okazji można zrozumieć nieco lepiej, o czym ględzę ja albo inny wykładowca kiedy staramy się przekazać, na przykład, na czym polega rozkład normalny.

Na i jeszcze jedna dygresja: w zasadzie każde równanie matematyczne wywodzące się z tych osiemnasto- i dziewiętnastowiecznych teorii miało swój początek w geometrii. Wszystko, co się może wydarzyć wyobrażamy sobie jako dwuwymiarową płaszczyznę. No wiem, Gauss poszedł dalej i zrobił to w trzech wymiarach, ale staram się nie spłoszyć czytelnika. Nie wiem, skąd dokładnie wywodziła się ówczesna fascynacja geometrią. Być może z faktu, że szybki rozwój astronomii umożliwił wtedy o wiele bardziej precyzyjny pomiar odległości i tworzenie o wiele dokładniejszych niż wcześniej map. To jednak tylko domysły, a ja chcę się skupić na podstawowej regule geometrycznej, która będzie nam tu towarzyszyć: jeżeli dzieją się dwa zjawiska, oddzielone od siebie czasem lub przestrzenią, to różnicę między tymi zjawiskami możemy wyrazić jako odległość, czy też jako drogę z punktu A do punktu B. Kiedy zastosować tą regułę do ludzkiego postępowania, zachowania bardzo odmienne dzielić będzie stosunkowo duża odległość, podczas gdy zachowania stosunkowo podobne są bliskie jedne drugiego.

To jednak nie wszystko. Jeszcze trochę tej geometrii. Znacie twierdzenie Pitagorasa ? No wiecie: w trójkącie prostokątnym kwadrat długości przeciwprostokątnej jest równy sumie kwadratów długości przeciwprostokątnych. No właśnie: każdy odcinek, czyli każdą odległość od zjawiska A do zjawiska B można wyobrazić sobie jako przeciwprostokątną (no, ten skośny bok) trójkąta prostokątnego. Ta odległość jest więc pierwiastkiem z sumy kwadratów dwóch współrzędnych: X (kategoria zdarzeń) oraz Y(natężenie zdarzeń). Poniżej przedstawiam to graficznie.

Odległość Euklidesowa_Pitagorejska

Teoria jest uogólnieniem doświadczenia. Odległość Euklidesowa jest tego doskonałym przykładem. Kiedy staramy się czaić bazę na temat zachowań ludzi dookoła nas, robimy tak: dzielimy te zachowania na ogólne kategorie, a następnie dokonujemy bardziej finezyjnej oceny natężenia, z jaką każda kategoria występuje. Pierwszy tydzień w pracy: wszyscy w tym biurze to młoty albo pijawki, chociaż jest paru fajnych (grupowanie według kategorii, współrzędna X). Drugi tydzień w pracy: jeden z kategorii „młoty” ma w sobie sporo młota, ale także jest trochę fajny, a jedna „fajna” ma jakby lekki odcień pijawki (ocena natężenia cech, czyli współrzędna Y).

No dobra, czyli biorę się za krzywą Gaussa i za ukryte pod nią założenia na temat rzeczywistości oraz ludzkich zachowań. Jesteśmy więc w świecie obfitej informacji, którą trzeba uporządkować. Mamy ten sklep internetowy z odzieżą, nasi klienci wypełniają ankiety na temat swojego stylu życia, obserwujemy ich decyzje w naszym sklepie, być może jeszcze zamawiamy badanie zachowań użytkowników Internetu przy pomocy silnika behawioralnego. Mamy sporo mierzalnych (liczbowych) danych na temat naszych klientów.

Kiedy zadajemy sobie pytanie „Jak mogą się zachowywać nasi klienci ?” i kiedy świta nam intuicyjna odpowiedź „Jak tylko chcą ?”, teoria de de Moivre’a i Gaussa mówi nam „Niezupełnie. Ludzkie zachowania, tak samo jak wiele innych zjawisk, mają skłonność do skupiania się. Najwięcej przypadków będzie skupionych wokół średniej, czyli wokół wartości oczekiwanej. To skupienie ma swoje reguły. Poniżej przedstawiam ogólny wzór na rozkład normalny oraz jego interpretację, która pozwala lepiej zrozumieć te reguły.

Rozkład normalny 1

Rozkład normalny 2

 

Teraz łączymy założenia odległości Euklidesowej z założeniami rozkładu normalnego. Cokolwiek ludzie robią, to co robią zaliczamy do jakiejś kategorii ‘x’. Każdy zbiór zachowań ma swoją średnią, czyli wartość oczekiwaną, czyli najbardziej prawdopodobną kategorię zachowań określaną jako ‘µ’. Każda kategoria zachowań ‘x’ występuje z prawdopodobieństwem – natężeniem ‘y’ – wyznaczanym przede wszystkim przez to, jak daleko jest od najbardziej prawdopodobnej kategorii ‘µ’. To, jak daleko kategoria zachowań ‘x’ znajduje się od najbardziej prawdopodobnej kategorii ‘µ’ jest mierzone w jednostkach odchylenia standardowego, czyli w sigmach. No i dalej to już z górki: dokładne prawdopodobieństwo występowania kategorii zachowań ‘x’ – czyli jej natężenie ‘y’ – jest określane wzorem omówionym powyżej. Najpierw wycinamy z całej rzeczywistości kawałek określany jako „stała Gaussa” czyli jeden dzielone przez pierwiastek z dwukrotności liczby pi, a potem ścinamy dalej według wzoru.

No i byłoby zupełnie fajnie, gdyby nie to, że nasze doświadczenie mówi nam często co innego: nie widzimy jasno określonych kategorii w zachowaniach ludzi dookoła nas. Nie widzimy jednego, dominującego typu zachowań. Co robić ? Jak działać ? Tu wracamy do filozofii matematycznej Thomasa Bayesa. Postaram się o niej szerzej opowiedzieć w kolejnych wpisach na moim blogu, a na razie zadowolę się ogólnym zarysem: w warunkach ogólnej niepewności co do zachowań innych ludzi zaczynamy eksperymentować i określamy w ten sposób, co jest dla nas korzystne, a co nie. Definiujemy, co jest dla nas sukcesem, a co porażką. Następnie, w drodze kolejnych eksperymentów, stopniowo zawężamy prawdopodobieństwo sukcesu albo porażki, a w jeszcze bardziej wyrafinowanej formie, określamy prawdopodobieństwo osiągnięcia ‘p’ sukcesów i ‘q’ porażek w serii ‘n’ prób.

Jak to może wyglądać w praktyce ? Powiedzmy, że mamy pomysł na biznes i staramy się znaleźć inwestorów. Spotykamy się z pierwszym możliwym z nich. Jeszcze nic z tego spotkania nie wynikło, ale mentalnie kreślimy mapę możliwych zachowań: każdy kolejny rozmówca może być tak jakby bardziej w tą stronę od tego pierwszego, albo jakby bardziej w przeciwną stronę. Spotykamy się z kolejnymi potencjalnymi inwestorami i za każdym razem staramy się wyciągać wnioski w podobny sposób: każdego kolejnego rozmówcę traktujemy jako typ, czyli jako reprezentatywny przykład jakiejś szerszej kategorii. W ten sposób tworzymy katalog możliwych typów zachowań u naszych potencjalnych inwestorów. Mniej lub bardziej świadomie tworzymy asocjacje: każdy typ zachowań kojarzymy z jakimś jednostkowym prawdopodobieństwem sukcesu albo porażki i jednocześnie dokonujemy skojarzenia z jakimiś czynnikami zewnętrznymi. „Jeżeli trafię na prezesa funduszu inwestycyjnego na początku kwartału, to mam większe prawdopodobieństwo zaangażowania go w negocjacje na temat finansowania mojego biznes planu, niż gdybym rozmawiał jedynie z analitykiem tego funduszu pod koniec okresu rozliczeniowego” – coś w tym rodzaju.

Jeżeli się temu bliżej przyjrzeć, mamy tu raz jeszcze do czynienia z fundamentalnym mechanizmem naszej psychiki, podobnie jak w przypadku odległości Euklidesowej. Kolejne doświadczenia są dla nas podstawą do budowania mentalnych kategorii oraz do kojarzenia ich wzajemnie między sobą. W ten sposób tworzy się język, którym się porozumiewamy.

Tyle na dzisiaj. Do zobaczenia w kolejnych wpisach na tym blogu.

Parfois j’ai du pot et parfois pas tout à fait

Mon éditorial

Ce dernier temps je me suis engagé très sérieusement dans la conception des milieux expérimentaux pour l’absorption des nouvelles technologies. Ce qui m’intéresse c’est le comportement humain dans le processus d’absorption de l’innovation. Je me suis dit que nous sommes plus nombreux que jamais sur cette planète et lorsqu’il y a plus de monde dans un espace constant, cela veut dire plus d’interactions humain-humain dans l’unité de temps, ce qui à son tour veut dire apprentissage plus rapide et plus d’expérimentation. Je me suis aussi dit qu’en dépit d’avoir appris pas mal des trucs utiles dans l’expérimentation avec les technologies nouvelles, nous sommes toujours plutôt maladroits lorsqu’il est question d’expérimenter avec nos propres structures sociales. La notion-même tend à avoir une très mauvaise presse – les associations d’idées genre « Corée du Nord » ou bien « goulag » viennent presque spontanément à l’esprit – seulement il vaut mieux se rendre compte que nous expérimentons avec nos propres structures sociales de toute façon. Tout changement des politiques publiques – santé, éducation, emploi etc. – que les hommes politiques présentent comme des solutions uniquement bénéfiques pour leurs nations respectives sont, en fait, toutes faites d’expérimentation. Si on ôtait, pour quelques minutes, le masque professionnel d’assurance du visage d’un homme ou une femme politique qui nous présentent un nouveau projet de loi, nous pourrions voir la même incertitude qui accompagnait un inventeur du XIXème siècle qui mettait en marche un prototype nouveau de moteur ou de turbine et priait pour que le truc ne pète pas immédiatement.

Tout apprentissage est donc fait d’une séquence d’expériences, même si nous ne nous en rendons pas compte. Si de toute façon nous expérimentons avec nos structures sociales, autant apprendre à le faire bien, avec un maximum des résultats et un minimum des dégâts. Une bonne expérience scientifique consiste à créer un environnement contrôlé, où nous pouvons provoquer des phénomènes alternatifs et les observer de façon plus précise, plus rapide et moins coûteuse que l’observation des mêmes phénomènes, surtout dans leur occurrence alternative, dans la vie réelle. Une expérience réduit le temps et le coût d’observer les façons alternatives de faire la même chose. Si je veux créer un environnement expérimental pour observer les façons dont les gens absorbent les nouvelles technologies, je peux commencer, par exemple, avec un raisonnement en parallèle, où je mets des variables contrôlées côte à côte avec les variables observées.

J’ai l’impression qu’il est temps de puiser un peu dans la littérature du sujet qui, dans ma discipline de recherche, semble être le plus proche d’expérimentation pure et dure : l’économie béhavioriste. Un peu par tradition, on attribue les débuts de l’économie béhavioriste à Herbert Simon (1955[1]). Comme j’aime bien lire ma littérature dans le sens inverse, de la fin vers le début, je commence ma revue de la théorie d’Herbert Simon par l’annexe à l’article proprement dit. Dans la science, c’est comme dans un contrat : les trucs les plus intéressants sont souvent mis dans l’annexe. Alors, cette annexe décrit un problème pratique : j’ai une maison à vendre et le prix du marché change dans le temps. D’abord, la mise en scène exacte. Chaque jour k, j’établis un prix de départ, acceptable pour moi, que Herbert Simon symbolise avec d(k). Si le jour k je reçois au moins une offre égale ou supérieure à d(k), je vends la maison à ce prix. Si je reçois plusieurs offres égales ou supérieures à d(k), je vends la maison au plus offrant. Si je ne reçois aucune proposition au moins égale à d(k), je retiens la maison jusqu’au prochain jour d’enchères et pour ce jour prochain j’établis un nouveau prix de départ d(k + 1). A chaque moment donné, je connais les prix passés mais les prix futurs restent incertains. Comment puis-je choisir le meilleur moment pour vendre ? Herbert Simon dit que dans une telle situation je peux former une stratégie subjectivement rationnelle, où j’utiliserai ma connaissance d’offres passées pour établir un prix de départ qui va maximiser ma valeur espérée V{d(k)}.

Bon, ça c’est le problème pratique et maintenant je bondis en arrière, vers le début de l’article, et je commence bien gentiment, par le début du discours théorique. Herbert Simon commence par assumer que l’ensemble des stratégies de comportement que je considère comme possibles dans la situation donnée sera, en fait, un sous-ensemble de l’ensemble total des comportements réellement possibles. Herbert Simon approche donc la rationalité limitée dans les choix économiques par le côté étroit, pour ainsi dire : il assume que les choix parfaitement rationnels prennent en considération un éventail des comportements possibles plus large que celui perçu par les agents économiques réels, qui ont une vision systématiquement rétrécie.

A l’époque (les années 1950), une assomption de ce genre était presque une révolution copernicienne par rapport au corset artificiellement étroit imposé par la théorie économique classique, où les choix économiques étaient soit pleinement rationnels soit ils n’étaient pas des choix économiques du tout. Seulement moi, j’ai à l’intérieur de moi ces trois personnages distincts qui m’accompagnent dans mon voyage de découverte : le bouledogue joyeux, le singe curieux et le moine austère. Ce dernier est un peu dangereux, comme il adore manier le rasoir d’Ockham et poser des questions embarrassantes du genre « Comment pouvons-nous être sûrs que la chose X est vraiment la chose X ? Ça pourrait aussi bien être la chose Y, avec juste un peu de ressemblance à X… ».

C’est bien le moine qui commence la bagarre, cette fois. Comment pouvons-nous être sûrs, dans un cas donné, que l’assomption d’Herbert Simon est vraie ? Oui, il est bien vrai que dans la vie quotidienne nous avons une tendance patente à rétrécir, par la peur et l’ignorance, l’étendue de nos possibilités. Seulement une tendance ce n’est pas la même chose qu’une structure de réalité : c’est l’une des structures possibles. Je connais ces situations dans la vie, lorsqu’une compagnie exquise, combinée avec une consommation un peu excessive des spiritueux, me fait faire des plans et des promesses qui s’avèrent terriblement embarrassantes le jour prochain : je prends en considération un éventail plus large des comportements que celui qui m’est réellement accessible ici et maintenant. Dans des cas extrêmes, je peux même aller, mentalement et momentanément, dans un univers parallèle où pas une seule, parmi les stratégies que je considère tout à fait sérieusement (pour le moment), ait une correspondance quelconque avec la réalité. Il y a aussi ces cas mixtes, souvent rencontrés dans les décisions d’affaires, quand certaines de stratégies que je prends en compte sont tout à fait rationnelles pendant que d’autres ne sont pas réalisables du tout.

L’assomption d’Herbert Simon – que dans me choix économiques je prends systématiquement en considération moins d’options qu’il en ait en réalité – est donc un cas spécial. Le cas général, c’est une situation où ces deux ensembles des comportements – l’ensemble A des tous les comportements réellement possibles et l’ensemble Am des comportements que je perçois subjectivement comme possibles – entretiennent des relations tout à fait libres. Am peut être contenu dans A ou bien l’inverse ; Am peut être complétement disjoint du A ou bien ils peuvent avoir une partie commune et des parties disjointes. C’est fou le nombre des trucs qui peuvent arriver lorsqu’on pense sérieusement à tout ce qui peut arriver.

Ces relations mathématiquement libertines entre le concevable et le perçu sembles être la pierre angulaire de l’économie behavioriste. Tout en admettant que les choix économiques que nous faisons sont généralement rationnels, les béhavioristes assument que toute solution économique – optimale ou pas –  est atteinte à travers une séquence de x essais, où x peut se ranger entre 1 et une limite indéfinie a priori, et chaque essai est un test de perception et de compréhension de la part des agents économiques impliqués.

Bon, prouesse théorique bien exposée, il est temps que je revienne à la réalité. Mon moine austère interne me demande : « Bon, tout ce truc des relations variables entre A et Am, qu’est-ce que ça prouve en ce qui concerne cette vente immobilière ? Quand est-ce que je dois vendre ? ». Alors, cette annexe dans l’article d’Herbert Simon aboutit à la conclusion que je peux former une stratégie de vente autant plus proche de la solution idéale que ma connaissance de l’occurrence des prix est étendue. Plus des jours d’enchères j’ai traversés, plus j’ai d’information sur les prix qui sont réellement pratiqués dans le marché. Avec un peu de chance, je peux percevoir un cycle dans ces prix et avec un peu de grâce dans mes mouvements je peux cibler le sommet de la crête. En généralisant, si mon Am se contient dans A, chaque expérience consécutive m’approche d’une perception de plus en plus pleine et de plus en plus fidèle de A. La perfection n’est jamais possible mais je peux apprendre à faire des décisions de mieux en mieux ciblées. C’est donc un cas d’apprentissage béhavioriste positif.

Maintenant, je renverse la relation : je pense que je peux plus que je peux réellement, donc mon ensemble Am est plus spacieux que l’ensemble A et le contient. Chaque essai que je fais peut se terminer par un succès – l’action entreprise s’avère réalisable – ou bien par un échec, quand l’action que j’ai prise se contient dans cet excédent de mon Am à l’extérieur d’A, dans ce domaine des tapis volants, épées dotées des superpouvoirs ainsi que des taux de retour sur investissement aux alentours de 200% par semaine. Là, mon apprentissage peut se passer de trois façons différentes. La première est la plus simple et la plus facile, puisqu’elle imite le cas précèdent : chaque fois que je prends une décision, j’ai suffisamment de pot pour que mon comportement choisi dans l’ensemble Am atterrisse dans l’ensemble A. En Pologne, nous appelons ça « plus de chance que de cervelle ». Remarquez : il suffit que ça marche juste une fois ou deux et j’ai des fortes chances d’acquérir un peu plus de cervelle, qui va remplacer la chance le cas échéant, et je peux me trouver dans la situation bénie de mon Am contenu dans A, donc dans l’univers théorique d’Herbert Simon. C’est pas mal, comme univers : ça avait valu un prix Nobel d’économie.

En revanche, si je n’ai pas assez de chance pour que son surplus remplace le manque de discernement de ma part, mes premiers choix sont ratés : je choisis, une fois ou deux (bon, pas plus de cinq, quand même) des tels comportements dans mon Am qui se trouvent en dehors du A, donc qui sont tout simplement irréalistes. Je commence mon apprentissage par une série d’échecs. L’absence de succès me décourage et j’arrête complètement d’expérimenter avec le choix économique donné. C’est le cas d’apprentissage béhavioriste négatif.

Il y a enfin un troisième chemin d’apprentissage, lorsque au moins certaines de mes options dans l’ensemble Am sont suffisamment erronées pour se trouver à l’extérieur d’A, mais certaines autres sont acceptablement raisonnables, et au tout début de mon parcours parfois j’ai du pot et parfois pas tout à fait. Je combine des succès et des échecs. C’est un chemin d’apprentissage que je peux appeler « Bayésien », puisqu’il reflète l’expérience décrite par Thomas Bayes en 1763 : mes succès et mes échecs me fournissent des informations que je peux utiliser pour définir de plus en plus exactement ce fragment de mon Am qui est identique avec un fragment d’A (options faisables), par opposition au fragment d’Am complétement disjoint d’A (options fantasques). La logique d’apprentissage Bayésien, quand on étudie à fond la pensée de Thomas Bayes, est des plus intrigantes : des séquences différentes des succès et d’échecs peuvent conduire à des savoirs (et des savoirs-faire) complètement disjoints l’un de l’autre.

Bon, je résume. Si chacune de mes décisions est une découverte des possibilités déjà offertes par mon environnement, donc si j’apprends suivant le paradigme d’Herbert Simon, je développe, d’une façon plus ou moins linéaire, un corps de savoir formé par cet environnement.  En revanche, si ma cervelle me permet d’inventer des schémas de comportement complètement irréalistes, tout en me bénissant des passages de réalisme, donc si j’apprends de façon Bayésienne, j’ai des chances presque égales de développer des corps de savoir complètement différents dans le même environnement.

Je retourne maintenant à cette histoire d’environnement expérimental pour des technologies de la ville intelligente. Supposons que je crée un groupe d’utilisateurs qui testent des prototypes et/ou fournissent des informations précieuses à travers leur comportement-même. Si je ne leur permets pas d’avoir ces échecs, donc si je leur donne suffisamment d’information pour qu’ils n’inventent rien de vraiment raté, je les mets automatiquement sur le chemin d’apprentissage béhavioriste positif. Ils vont tous apprendre plus ou moins la même chose et la variable que je peux tester dans un tel environnement expérimental c’est essentiellement leur vitesse d’apprentissage. En revanche, si mon environnement expérimental donne la possibilité de faire quelque chose de vraiment bête et dysfonctionnel, je mets mes utilisateurs-cobayes sur le chemin d’apprentissage Bayésien et ils peuvent développer toute une multitude des savoirs différents.

La même logique accompagne la distinction entre un algorithme classique et l’intelligence artificielle. Si vous avez déjà travaillé avec un compilateur de programmation typique, par exemple celui de Python, il accepte uniquement des trucs qui marchent. Le savoir-faire que vous pouvez développer avec un tel outil est une copie du savoir-faire des créateurs du langage de programmation donné. Si, par contre, vous êtes en interaction avec un outil d’intelligence artificielle, il va accepter vos solutions ratées, donc vos échecs, comme une information de valeur et créer des solutions différentes suivant des séquences différentes des succès et d’échecs de votre part.

Je continue à vous fournir de la bonne science, presque neuve, juste un peu cabossée dans le processus de conception. Je veux utiliser le financement participatif pour me donner une assise financière dans cet effort. Voici le lien hypertexte de mon compte sur Patreon . Si vous vous sentez prêt à cofinancer mon projet, vous pouvez vous enregistrer comme mon patron. Si vous en faites ainsi, je vous serai reconnaissant pour m’indiquer deux trucs importants : quel genre de récompense attendez-vous en échange du patronage et quelles étapes souhaitiez-vous voir dans mon travail ?

[1] Simon A.,H., A Behavioral Model of Rational Choice, The Quarterly Journal of Economics, Vol. 69, No. 1 (Feb., 1955), pp. 99-118

The path of thinking, which has brought me to think what I am thinking now

My editorial

I am thinking about the path of research to take from where I am now. A good thing in the view of defining that path would be to know exactly where am I now, mind you. I feel like summarising a chunk of my work, approximately the three last weeks, maybe more. As I finished that article about technological change seen as an intelligent, energy-maximizing adaptation , I kind of went back to my idea of local communities being powered at 100% by renewable energies. I wanted to set kind of scientific foundations for a business plan that a local community could use to go green at 100%. More or less intuitively, I don’t really know why exactly, I connected this quite practical idea to Bayesian statistics, and I went straight for the kill, so to say, by studying the foundational paper of this whole intellectual stream, the one from 1763 (Bayes, Price 1763[1]). I wanted to connect the idea of local communities based entirely on renewable energies to that of a local cryptocurrency (i.e. based on the Blockchain technology), somehow attached to the local market of energy. As I made this connection, I kind of put back to back the original paper by Thomas Bayes with that by Satoshi Nakamoto, the equally mysterious intellectual father of the Bitcoin. Empirically, I did some testing at the level of national data about the final consumption of energy, and about the primary output of electricity, I mean about the share of renewable energy in these. What I have, out of that empirical testing, is quite a lot of linear models, where I multiple-regress the shares, or the amounts, of renewable energies on a range of socio-economic variables. Those multiple regressions brought some seemingly solid stuff. The share of renewable energies in the primary output of electricity is closely correlated with the overall dynamics in the final consumption of energy: the faster the growth of that total market of energy, the greater the likelihood of shifting the production of electricity towards renewables. As dynamics are concerned, the years 2007 – 2008 seem to have marked some kind of threshold: until then, the size of the global market in renewable energies had used to grow at slower a pace than the total market of energy, whilst since then, those paces switched, and the renewables started to grow faster than the whole market. I am still wrapping my mind around that fact. The structure of economic input, understood in terms of the production function, matters as well. Labour-intensive societies seem to be more prone to going green in their energy base than the capital-intensive ones. As I was testing those models, I intuitively used the density of population as control variable. You know, that variable, which is not quite inside the model, but kind of sitting by and supervising. I tested my models in separate quantiles of density in population, and some interesting distinctions came out of it. As I tested the same model in consecutive sextiles of density in population, the model went through a cycle of change, with the most explanatory power, and the most robust correlations occurring in the presence of the highest density in population.

I feel like asking myself why have I been doing what I have been doing. I know, for sure, that the ‘why?’ question is abyssal, and a more practical way of answering it consists in hammering it into a ‘how?’. What has been my process? Step 1: I finish an article, and I come to the conclusion that I can discuss technological change in the human civilisation as a process of absorbing as much energy as we can, and of adapting to maximise that absorption through an evolutionary pattern similar to sexual selection. Step 2: I blow some dust off my earlier idea of local communities based on renewable energies. What was the passage from Step 1 to Step 2? What had been crystallising in my brain at the time? Let’s advance step by step. If I think about local communities, I am thinking about a dispersed structure, kind of a network, made of separate and yet interconnected nodes. I was probably trying to translate those big, global paradigms, which I had identified before, into local phenomena, the kind you can experience whilst walking down the street, starting a new small business, or looking for a new job. My thinking about local communities going 100% green in their energy base could be an expression of an even deeper and less articulate a thinking about how do we, humans, in our social structure, maximize that absorption of energy I wrote about in my last article.

Good, now Step 3: I take on the root theory of Bayesian statistics. What made me take that turn? I remember I started to read that paper by pure curiosity. I like reading the classics, very much because only by reading them I discover how much bulls*** has been said about their ideas. What attracted my attention, I think, in the original theory by Thomas Bayes, was that vision of a semi-ordered universe, limited by previous events, and the attempt to assess the odds of having a predictable number of successes over quite a small number of trials, a number so small that it defies the logic of expected values in big numbers, genre De Moivre – Laplace. I was visibly thinking about people, in local communities, making their choices, taking a limited number of trials at achieving some outcome, and continuing or giving up, according to said outcomes. I think I was trying, at the time, to grasp the process of maximizing the absorption of energy as a sequence of individual and collective choices, achieved through trial and error, with that trial and error chaining into itself, i.e. creating a process marked by hysteresis.

Step 4: putting the model of the Bitcoin, by Satoshi Nakamoto, back to back with the original logic by Thomas Bayes. The logic used by Satoshi Nakamoto, back in the day, was that of a race, inside a network, between a crook trying to abuse the others, and a chained reaction from the part of ‘honest’ nodes. The questions asked were: how quick does a crook has to be in order to overcome the chained reaction of the network? How big and how quick on the uptake does the network has to be in order to fend the crook off? I was visibly thinking about rivalling processes, where rivalry sums up to overtaking and controlling some kind of consecutive nodes in a network. What kind of processes could I have had in mind? Well, the most obvious choice are the processes of absorbing energy: we strive to maximise our absorption of energy, we have the choice between renewable energies and the rest (fossils plus nuclear), and those choices are chained, and they are chained so as to unfold in time at various speeds. I think that when I put Thomas Bayes and Satoshi Nakamoto on the same school bench, the undertow of my thinking was something like: how do the choices we make influence further choices we make, and how does that chain of choices impact the speed the market of renewable energy develops, as compared to the market of other energy sources?

Step 5: empirical tests, those multiple regressions in a big database made of ‘country – year’ observations. Here, at least, I am pretty much at home with my own thinking: I know I habitually represent in my mind those big economic measures, like GDP per capita, or density of population, or the percentage of green energy in my electric socket, as the outcome of complex choices made by simple people, including myself. As I did that regressing, I probably, subconsciously, wanted to understand how some type of economic choices we make impacts other types of choices, more specifically those connected to energy. I found some consistent patterns at this stage of research. Choices about the work we do and about professional activity, and about the wages we pay and receive, are significant to the choices about energy. The very basic choice to live in a given place, so to cluster together with other humans, has one word or two to say, as well. The choices we make about consuming energy, and more specifically the choice of consuming more energy than the year before, are very important for the switch towards the renewables. Now, I noticed that turning point, in 2007 – 2008. Following the same logic, 2007 – 2008 must have been the point in time, where the aggregate outcomes of individual decisions concerning work, wages, settlement and the consumption of energy summed up into a change observable at the global scale. Those outcomes are likely to come out, in fact, from a long chain of choices, where the Bayesian space of available options has been sequentially changing under the impact of past choices, and where the Bitcoin-like race of rivalling technologies took place.

Step 6: my recent review of literature about the history of technology showed me a dominant path of discussion, namely that of technological determinism, and, kind of on the margin of that, the so-called Moore’s law of exponentially growing complexity in one particular technology: electronics. What did I want to understand by reviewing that literature? I think I wanted some ready-made (well, maybe bespoke) patterns, to dress my empirical findings for posh occasions, such as a conference, an article, or a book. I found out, with surprise, that the same logic of ‘choice >> technology >> social change >> choice etc.’ has been followed by many other authors and that it is, actually, the dominant way of thinking about the history of technology. Right, this is the path of thinking, which has brought me to think what I am thinking now. Now, what questions to I want to answer, after this brief recapitulative? First of all, how to determine the Bayesian rectangle of occurrences, regarding the possible future of renewable energies, and what that rectangle is actually likely to be? Answering this question means doing something we, economists, are second to none at doing poorly: forecasting. Splendid. Secondly, how does that Bayesian rectangle of limited choice depend on the place a given population lives in, and how does that geographical disparity impact the general scenario for our civilisation as a whole? Thirdly, what kind of social change is likely to follow along?

[1] Mr. Bayes, and Mr Price. “An essay towards solving a problem in the doctrine of chances. by the late rev. mr. bayes, frs communicated by mr. price, in a letter to john canton, amfrs.” Philosophical Transactions (1683-1775) (1763): 370-418

Those a’s and b’s to put inside (a + b) when doing (a + b) power (p+q)

My editorial

I am finishing compiling notes for that article on the role of monetary systems in the transition towards renewable energies, at least I hope I am. This is a bit of a strange frame of mind when I hope I am. Could I be hoping I am not? Interesting question. Anyway, one of the ways I make sure I understand what I am writing about is to take a classic, whom I previously kind of attached to this particular piece of science I am trying to make, and I kind of filter my own thoughts and findings through that particular classic’s thoughts and findings. This time, Thomas Bayes is my classic. Didn’t have much to do with renewable energies, you would say? Weeeell, he was a philosopher and a mathematician, but he lived (and died) in the 18th century, when Europe was being powered by wind and water, thus, as a matter of fact, he had much to do with renewable energies. At the end of the 18th century, in my homeland – Southern Poland, and back in the day is was Austrian Galicia – there was one watermill per 382 people, on average.

And so I am rereading the posthumous article, attributed to reverend Thomas Bayes, received by Mr John Canton, an editor of ‘Philosophical Transactions’ at the Royal Society. On the 23rd of December, 1763, John Canton read a letter, sent from Newington-Green, on the 10th of November, by Mr Richard Price. The letter was being accompanied by an attachment, in the form of a dissertation on ‘the doctrine of chances’, allegedly found by Mr Price in the notes of a defunct friend, Thomas Bayes. The friend had been defunct for two years, at the time, which is quite intriguing in itself. Anyway, Mr Richard Price presented the dissertation as Thomas Bayes’ work, and this is how Bayesian statistics were born  (Bayes, Price 1763[1]). Just as a reminder: in Thomas Bayes’ world, we are talking about having p successes and q failures in p + q trials, in the presence of one single success being probable at the rate ‘a’, and the probability of a single failure being ‘b’. The general way of thinking about it, in this specific universe, is that we take the sum of probabilities, like (a + b), and we give it some depth by elevating it to the power p + q. We create a space of probability through developing the Newtonian binomial (a + b)p+q.

At this point it is useful to dig a little bit into the logic of the Newtonian binomial. When I do (a + b)p+q , Isaac Newton tells me to kind of climb a ladder towards q, one step at a time, and so I am climbing that ladder of failure. First, I consider full success, so my p successes are exactly equal to my n trials, and my failure count is q = 0. In this most optimistic case, the number of different ways I can have that full score of successes is equal to the binomial coefficient (pq/q!) = (p0/0!) = 1/1 = 1. I have just one way of being successful in every trial I take, whatever the number of trials, and whatever the probability of a single success. The probability attached to that one-million-dollar shot is (pq/q!)*ap. See that second factor, the ap.? The more successes I want the least probability I have them all. A probability is a fraction smaller than 1. When I elevate it to any integer, it gets smaller. If the probability of a single success is like fifty-fifty, thus a = 0,5, and I want 5 successes on 5 trials, and I want no failures at all, I can expect those five bull’s eyes with a probability of (50/0!)*0,55 = 0,55 = 0,03125. Now, if I want 7 successes on 7 trials, zero failures, my seven-on-seven-shots-in-the-middle-probability is equal to (70/0!)*0,57 = 0,57 = 0,0078125. See? All I wanted was two more points scored, seven on seven instead of five on five, and this arrogant Newtonian-Bayesian approach sliced my odds by four times.

Now, I admit I can tolerate one failure over n trials, and the rest has to be just pure success, and so my q = 1. I repeat the same procedure: (p1/1!)*ap-1b1. With the data I have just invented, 4 successes on 5 trials, with 0,5 odds of having a single success, so with a = b = 0.5, I have (41/1!) = 4 ways of having that precise compound score. Those 4 ways give me, at the bottom line, a compound probability of (41/1!)*0,54*0,51 = 4*0,54*0,51 = 0,125. Let’s repeat, just to make it sink. Seven trials, two failures, five successes, one success being as probable as one failure, namely a = b = 0,5. How many ways of having 5 successes and 2 failures do I have over 7 trials? I have (52/2!) = 12,5 them ways. How can I possibly have 12,5 ways of doing something? This is precisely the corkscrewed mind of Thomas Bayes: I have between 12 and 13 ways of reaching that particular score. The ‘between’ has become a staple of the whole Bayesian theory.

Now, I return to my sheep, as the French say. My sheep are renewable (energies). Let’s say I have statistics telling me that in my home country, Poland, I have 12,52% of electricity being generated from renewable sources, A.D. 2014. If I think that generating a single kilowatt-hour the green way is a success, my probability of single success, so P(p=1) = a = 0,1252. The probability of a failure is P(q=1) = b = 1 – 0,1252 = 0,8748. How many kilowatt-hours do I generate? Maybe just enough for one person, which, once again averaged, was 2495,843402 kg of oil equivalent or 29026,65877 kilowatt hour per year per capita (multiplied the oil of by 11,63 to get the kilowatt hours). Here, Thomas Bayes reminds me gently: ‘Mr Wasniewski, I wrote about the probability of having just a few successes and a few failures over a few plus a few equals a few total number trials. More than 29 thousands of those kilowatt-hours or whatever it is you want, it is really hard to qualify under ‘a few’. Reduce.’ Good, so I reduce into megawatt hours, and that gives me like n = 29.

Now, according to Thomas Bayes’ logic, I create a space of probabilities by doing (0,1252 + 0,8748)29. The biggest mistake I could make at this point would be to assume that 0,1252 + 0,8748 = 1, which is true, of course, but most impractical for creating spaces of probability. The right way of thinking about it is that I have two distinct occurrences, one marked 0,1252, the other marked 0,8748, and I project those occurrences into a space made of 29 dimensions. In this interesting world, where you have between six and eight ways of being late or being tall, I have like patches of probability. Each of those patches reflects my preferences. You want to have 5 megawatt hours, out of those 29, generated from renewable sources, Mr Wasniewski? As you please, that will make you odds of ((529-5/(29-5)!)*0,12525*0,874829-5 = 1,19236E-13 of reaching this particular score. The problem, Mr Wasniewski, is that you have only 0,000000096 ways of reaching it, which is a bit impractical, as ways come. Could be impossible to do, as a matter of fact.

So, when I create my multiverse of probability the Thomas Bayes way, some patches of probability turn out to be just impracticable. If I have like only 0,000000096 ways of doing something, I have a locked box, with the key to the lock being locked inside the box. No point in bothering about it. When I settle for 10 megawatt hours successfully generated from renewable sources, against 19 megawatt hours coming from them fossil fuels, the situation changes. I have ((1029-10)/(29-10)!) = 82,20635247, or rather between 82 and 83, although closer to 82 ways of achieving this particular result. The cumulative probability of 10 successes, which I can score in those 82,20635247 ways, is equal to ((1029-10)/(29-10)!)*0,125210*0,874829-10 =  0,0000013. Looks a bit like the probability of meeting an alien civilisation whilst standing on my head at 5 a.m. in Lisbon, but mind you, this is just one patch of probability, and I have more than 82 ways of hitting it. My (0,1252 + 0,8748)29 multiverse contains 29! = 8,84176E+30 such patches of probability, some of them practicable, like 10 megawatt hours out of 29, others not quite, like 5 megawatt hours over 29. Although Thomas Bayes wanted to escape the de Moivre – Laplace world of great numbers, he didn’t truly manage to. As you can see, patches of probability on the sides of this multiverse, with very few successes or very few failures, seem blinking red, like the ‘Occupied’ sign on the door to restrooms. Only those kind of balanced ones, close to successes and failures scoring close to fifty-fifty, yield more than one way of hitting them. Close to the mean, man, you’re safe and feasible, but as you go away from the mean, you can become less than one, kind of.

Thus, if I want to use the original Bayesian method in my thinking about the transition towards renewable energies, it is better to consider those balanced cases, which I can express in the form of just a few successes and a few failures. As tail events enter into my scope of research, so when I am really honest about it, I have to settle for the classical approach based on the mean, expected values, de Moivre – Laplace way. I can change my optic to use the Bayesian method more efficiently, though. I consider 5 local projects, in 5 different towns, and I want to assess the odds of at least 3 of them succeeding. I create my multiverse of probabilities as (0,1252 + 0,8748)3+2=5, which has the advantage of containing just 5! = 120 distinct patches of probability. Kind of more affordable. Among those 120 patches of probability, my target, namely 3 successful local projects out of 5 initiated, amounts to (32/2!) = 4,5 ways of doing it (so between 4 and 5), and all those alternative ways yield a compound probability of (32/2!)*0,12523*0,87472 = 0,006758387. Definitely easier to wrap my mind around it.

I said, at the beginning of the today’s update, that I am using Thomas Bayes’ theory as a filter for my findings, just to check my logic. Now, I see that the results of my quantitative tests, those presented in previous updates, should be transformed into simple probabilities, those a’s and b’s to put inside (a + b) when doing (a + b)p+q. My preferences as for successes and failures should be kept simple and realistic, better below 10.

[1] Mr. Bayes, and Mr Price. “An essay towards solving a problem in the doctrine of chances. by the late rev. mr. bayes, frs communicated by mr. price, in a letter to john canton, amfrs.” Philosophical Transactions (1683-1775) (1763): 370-418

Le rectangle Bayésien et mon business plan

Mon éditorial, droit de la ville d’Amplepuis cette fois

Je peux résumer ces quelques derniers jours d’écriture. Je suis en train d’étudier la théorie de probabilité, appliquée à un cas réel : mon idée de développer des systèmes énergétiques locaux basés sur les énergies renouvelables et dotées d’un système monétaire local. Comme je conduisais ce fil de raisonnement, j’ai remarqué que je commencé à faire le prof. Je profitais, dans chaque mise à jour, de l’occasion offerte par le sujet pour exposer, de façon didactique, des questions fondamentales du calcul des probabilités. Au fond, ceci n’est pas une mauvaise chose. J’ai bien l’ambition de tourner mon blog scientifique, un jour, en un site éducatif. Autant pratiquer un peu.

Alors, je résume partiellement ma recherche théorique et, en même temps, je résume l’aspect éducatif. Un cas réel, comme celui-ci, donc un business plan pour un projet innovant, nous fait comprendre quelques implications pratiques du calcul des probabilités. Premièrement, une probabilité est une proportion entre des fragments de réalité et c’est précisément ça l’utilité de base du calcul des probabilités. Nous avons une tendance innée à essayer de prédire ce qui va se passer, mais nous disposons de moyens très limités pour faire une telle prédiction de façon intelligible, donc communicable aux autres. Les évènements s’accompagnent mutuellement, ils forment des séquences et des structures. L’assomption du système aristotélicien et déterministe était que nous vivons tous et toujours dans la même structure. C’est aussi une tentation instinctive de notre cerveau de créer l’illusion de reproduction continue d’un même schéma.    Néanmoins, la science moderne nous dit que notre existence est un passage constant entre des différentes structures de réalité. Essayer de prédire l’avenir veut dire deviner dans quelle structure on va atterrir. En plus, nous avons une capacité vraiment limitée de faire la différence entre la réalité d’une part et notre image de la réalité d’autre part. Ce que nous pouvons faire – et que nous faisons tout le temps, en fait, à un niveau neurologique très primaire – consiste à créer beaucoup de représentations alternatives de réalité et à essayer voir laquelle de parmi elles marche le mieux, donc laquelle nous donne le plus d’exactitude de prédiction.

Si je vivais cents ans en arrière, et si ce business plan concernait un nouveau moulin à vent, ce plan serait déterministe. Il ne serait même pas question de business plan, en fait, puisque tout serait réglé par des assomptions du type « il en a toujours été ainsi ». Pourquoi donc aujourd’hui nous faisons des business plans ? Eh bien, parce que nous sommes déjà habitués, au niveau culturel, à l’approche probabiliste : « Donc, mon cher enthousiaste, dans quel univers places-tu ton projet, comment définis-tu ton succès et comment peux-tu m’assurer qu’il y a un chemin rationnellement prévisible vers ledit succès ? ». C’est le moment de tirer le probas de notre manche. Question no. 1 : l’univers. Je sais, l’univers, c’est plutôt grand et plutôt infini. En fonction de la théorie de probabilité qu’on choisit, cet univers peut être plus ou moins infini. Je commence avec l’univers qui est apparemment le plus infini, donc avec l’univers de de Moivre et Laplace. Je cherche ces moyennes solides, à plier de l’acier autour d’elles : je cherche des infos sur les variables que j’ai choisies comme conditions de succès : la taille du marché de l’énergie ou Q(E), les prix d’énergie P(E), le pouvoir d’achat individuel PP(E) en ce qui concerne ladite énergie, le taux de retour sur actifs ROA, l’offre agrégée de l’argent M, ainsi que la taille du marché W des transactions effectuées en des monnaies virtuelles. Dans un business plan, vous pouvez fréquemment trouver ces données-là comme « Etude primaire de marché » ou un truc similaire.

Voilà, maintenant que j’ai épinglé ces moyennes sur ma table, je peux créer un univers un peu moins infini, celui de Thomas Bayes. En fait, je le suis déjà dit hier qu’en vertu de clarté il serait utile que je dessine le rectangle Bayésien, celui qui a servi Thomas Bayes à construire la preuve de ses propositions. Donc, vous cliquez ici, sur le rectangle Bayésien et vous pouvez le voir, aussi fidèle au dessin originel que j’ai pu le faire. Le truc, ici, c’est de construire un univers abordable, fini, avec des limites. Qu’est-ce qui peut bien se passer ? Tout, en fait, mais dans ce tout il y a des choses qui ne sont liées à mon projet que d’une façon très distante. J’utilise ces moyennes du type de Moivre – Laplace que j’ai déjà trouvées. Provisoirement, je construis cinq rectangles Bayésiens, un pour chaque variable dans mon objectif quantifiable ( M et W se trouvent dans un seul rectangle, puisque mon objectif quantifiable dans leur cas c’est W/M). Leurs distributions respectives feront la longueur du côté AB dans chaque rectangle ou, en langage humain, elles représentent ce qui peut raisonnablement se passer.

Là, une petite remarque semble utile. Dans ce rectangle Bayésien, vous pouvez remarquer une ligne centrale Ii, genre de sécante à travers cet univers. C’est celle qui touche à cette espèce de bosse sous le rectangle proprement dit. La bosse en rouge, c’est une ligne que Thomas Bayes a dessinée sous le rectangle et la seule ligne courbe dans tout son dessin originel. Eh bien, quoi qu’il ne le dit pas directement dans son article (Bayes, Price 1763[1]), je devine que cette ligne courbe c’est la distribution de De Moivre – Laplace ou, si vous voulez une référence plus proche dans le temps, une distribution Gaussienne. Le point « i » sur cette courbe semble être la moyenne, ou la valeur espérée de la distribution. De là, je déduis que l’intention de Thomas Bayes était de placer son raisonnement dans un univers congruent avec celui de De Moivre – Laplace, mais plus étroit et plus défini.

Alors, la première balle de Thomas Bayes est jetée, celle qu’il eût désignée comme « W » est qui est censée positionner l’univers de probabilité même plus exactement par rapport à l’immensité de tout ce qui peut se passer. Sa position d’atterrissage fixe la position du point « o » sur le côté AB du rectangle et la position de la ligne Sow. En regardant la position de ce point « o » et de la ligne Sow qu’il fixe je me dis – et c’est encore une fois une supposition de ma part – que Thomas Bayes avait en tête une situation où cet évènement initial d’atterrissage de la première balle découpe un fragment vraiment très circonscrit par rapport à l’univers initial.

Bon, donc dans mon business plan, je jette cette première balle. Dans chacun de ces cinq rectangles Bayésiens initiaux que j’avais tracé précédemment autour de mes six moyennes – la taille du marché de l’énergie Q(E), les prix d’énergie P(E), le pouvoir d’achat individuel PP(E) en ce qui concerne l’énergie, le taux de retour sur actifs ROA, l’offre agrégée de l’argent M, et la taille du marché W des transactions effectuées en des monnaies virtuelles – ce premier jet de balle découpe une section où je veux bien me trouver avec mon projet, une sorte de zone favorable.

Maintenant, le temps vient de jeter la seconde balle « O », celle qui est mon essai proprement dit. Pour les besoins d’un business plan, il faut bien la calibrer, cette seconde balle. Intuitivement, dans mon cas précis de systèmes énergétiques locaux, je choisis des balles de calibre différent pour des rectangles différents. Quand j’étudie mes chances de succès dans le marché local, donc quand je parle de la consommation locale d’énergie ainsi que des prix et du pouvoir d’achat, je prends un consommateur comme une balle. Ma balle « W » était donc un consommateur représentatif pour un succès de ma part ; donc un consommateur qui peut bien se permettre de payer pour toute l’énergie verte dont il a besoin pour couvrir toute sa demande individuelle. Ma ligne Sow dans le rectangle c’est la frontière entre le marché composé de consommateurs aux caractéristiques favorables à mon projet, d’une part, et tout le reste du marché d’autre part. Ma balle « O » c’est un essai de ma part d’atterrir, avec mon marketing local, dans le segment de consommateurs qui ont au moins ce profil-là ou même mieux, comme des enthousiastes avec portefeuille épais et un sens d’engagement prononcé. Mon nombre total d’essais est le nombre total de consommateurs que je peux raisonnablement espérer de toucher avec mon effort marketing.

Là, je peux montrer la différence entre la logique Bayésienne et celle de la distribution Poisson, utilisée par Satoshi Nakamoto dans ses simulations initiales pour le Bitcoin. Dans la distribution Poisson le nombre total d’essais est toujours défini comme un intervalle de temps. Si j’appréhendais mon business plan du côté Poisson, ma question serait « Quelle est la probabilité que j’attire le nombre de consommateurs voulu dans un intervalle de temps N ? ». Dans la logique Bayésienne je peux me concentrer sur cet aspect temporel ou utiliser une autre échelle (autre que le temps, je veux dire) pour mesurer mon nombre d’essais.

Disons que pour la clarté, je choisis une échelle temporelle. Je veux calculer la probabilité Bayésienne du scénario suivant : sur les 365 jours de l’année, je veux 265 jours avec succès marketing et je peux tolérer 100 jours avec échec. La probabilité de succès pour un seul jour est de 50%, donc 0,5. Ma probabilité Bayésienne se calcule comme E*ap*bq = (265100/100 !)*0,5265*0,5100 = 3,01048*e-26. N’essayez même pas de l’écrire normalement. La probabilité d’un tel scénario est tellement minime, dans la logique Bayésienne, que je peux m’en passer dans mon business plan.

Maintenant, la logique de Siméon Denis Poisson et sa formule P = e-l*(lk/k !), où « e » est la constante e = 2,71828…, « l » est le nombre moyen espéré d’évènements par intervalle de temps, et « k » est le nombre de succès par intervalle de temps. Comme la probabilité d’un seul succès est de 50%, le nombre moyen espéré est de l = 0,5*365 = 182,5. Ma probabilité de Poisson, de 265 jours à succès en une année est donc de P = e-182,5*(182,5265/265 !) et alors c’est là que ça pète, puisque le résultat est de – 179,28. Ceci n’est pas une probabilité.

Bon, mon cerveau commence à démanger. Ce sera tout pour aujourd’hui.

[1] Mr. Bayes, and Mr Price. “An essay towards solving a problem in the doctrine of chances. by the late rev. mr. bayes, frs communicated by mr. price, in a letter to john canton, amfrs.” Philosophical Transactions (1683-1775) (1763): 370-418

A race across target states, or Bayes and Nakamoto together

My editorial

And so I continue prodding my idea of local, green energy systems, with different theories of probability. The three inside me – my curious ape, my austere monk, and my happy bulldog – are having a conversation with two wise men: reverend Thomas Bayes, and Satoshi Nakamoto. If you need to keep track of my last updates, you can refer to ‘Time puts order in the happening’ as well as to ‘Thomas Bayes, Satoshi Nakamoto et bigos’. And so I am at the lemmas formulated by Thomas Bayes, and at the basic analytical model proposed by Nakamoto. Lemma #1 by Thomas Bayes says: ‘The probability that the point o will fall between any two points in the line AB is the ratio of the distance between the two points to the whole line AB’. Although Thomas Bayes provides a very abundant geometric proof to this statement, I think it is one of those things you just grasp intuitively. My chances of ever being at the coast of the Pacific Ocean are greater than those of ever visiting one tiny, coastal village in the Hawaii, just because the total coastline of the Pacific is much bigger an expanse than one, tiny, Hawaiian village. The bigger is my target zone in relation to the whole universe of probability, the greater is my probability of hitting the target. Now, in lemma #2, we read pretty much the same, just with some details added: ‘The ball W having been thrown, and the line os drawn, the probability of the event M in a single trial is the ratio of Ao to AB’.

I think a little reminder is due in relation to those two Bayesian lemmas. As for the detailed Bayes’s logic, you can refer to Bayes, Price 1763[1], and I am just re-sketching the landscape, now. The whole universe of probability, in Thomas Bayes’s method, is a flat rectangle ABCD, with corners being named clockwise, starting from A at the bottom right, as if that whole universe started around 4 o’clock. AB is kind of width of anything that can happen. Although this universe is a rectangle, it is essentially unidimensional, and AB is that dimension. I throw two balls, W and O. I throw W as the first, at the point where it lands in the rectangle ABCD becomes a landmark. I draw a line through that point, perpendicular to AB, crossing AB at the point o, and CD and the point s. The line os becomes the Mississippi river of that rectangle: from now on, two sub-universes emerge. There is that sub-universe of M happening, or success, namely of the second ball, the O, landing between the lines os and AD (in the East). On the other hand, there are all those strange things that happen on the other side of the line os, and those things are generally non-M, and they are failures to happen. The probability of the second ball O hitting M, or landing between the lines os and AD, is equal to p, or p = P(M). The probability of the ball O landing west of Mississippi, between the lines os and BC, is equal to q, and this is the probability of a single failure.

On the grounds of those two lemmas, Thomas Bayes states one of the most fundamental propositions of his whole theory, namely proposition #8: ‘If upon BA you erect a figure BghikmA, whose property is this, that (the base BA being divided into any two parts, as Ab and Bb and at the point of division b a perpendicular being erected and terminated by the figure in m; and y, x, r representing respectively the ratio of bm, Ab, and Bb to AB, and E being the coefficient of the term in which occurs ap*bq when the binomial [a + b]p + q is expanded) y = E*xp*rq. I say that before the ball W is thrown, the probability the point o should fall between f and b, any two points named in the line AB, and that the event M should happen p times and fail q [times] in p + q = n trials, is the ratio of fghikmb, the part of the figure BghikmA intercepted between the perpendiculars fg, bm, raised upon the line AB, to CA the square upon AB’.

Right, I think that with all those lines, points, sections, and whatnot, you could do with some graphics. Just click on this link to the original image of the Bayesian rectangle and you will see it as I tried to recreate it from the original. I think I did it kind of rectangle-perfectly. Still, according to my teachers of art, at school, my butterflies could very well be my elephants, so be clement in your judgment. Anyway, this is the Bayesian world, ingeniously reducing the number of dimensions. How? Well, in a rectangular universe ABCD, anything that can happen is basically described by the powers ABBC or BCAB. Still, if I assume that things happen just kind of on one edge, the AB, and this happening is projected upon the opposite edge CD, and the remaining two edges, namely BC and DA, just standing aside and watching, I can reduce a square problem to a linear one. I think this is the whole power of geometry in mathematical thinking. Whilst it would be foolish to expect rectangular universes in our everyday life, it helps in dealing with dimensions.

Now, you can see the essence of the original Bayesian approach: imagine a universe of occurrences, give it some depth by adding dimensions, then give it some simplicity by taking some dimensions away from it, and map your occurrences in thus created an expanse of things that can happen. Now, I jump to Satoshi Nakamoto and his universe. I will quote, to give an accurate account of the original logic: ‘The success event is the honest chain being extended by one block, increasing its lead by +1, and the failure event is the attacker’s chain being extended by one block, reducing the gap by -1. The probability of an attacker catching up from a given deficit is analogous to a Gambler’s Ruin problem. Suppose a gambler with unlimited credit starts at a deficit and plays potentially an infinite number of trials to try to reach breakeven. We can calculate the probability he ever reaches breakeven, or that an attacker ever catches up with the honest chain, as follows:

p = probability an honest node finds the next block

q = probability the attacker finds the next block

qz = probability the attacker will ever catch up from z blocks behind

Now, I rephrase slightly the original Nakamoto’s writing, as the online utilities I am using on my mutually mirroring blogs – https://discoversocialsciences.com and https://researchsocialsci.blogspot.com – are not really at home with displaying equations. And so, if p ≤ q, then qz = 1. If, on the other hand, p > q, my qz = (q/p)z. As I mentioned it in one of my previous posts, I use the original Satoshi Nakamoto’s thinking in the a contrario way, where my idea of local green energy systems is the Nakamoto’s attacker, and tries to catch up, on the actual socio-economic reality from z blocks behind. For the moment, and basically fault of a better idea, I assume that my blocks can be carved in time or in capital. I explain: catching from z blocks behind might mean catching in time, like from a temporal lag, or catching up across the expanse of the capital market. I take a local community, like a town, and I imagine its timeline over the 10 years to come. Each unit of time (day, week, month, year) is one block in the chain. Me, with my new idea, I am the attacker, and I am competing with other possible ideas for the development and/or conservation of that local community. Each idea, mine and the others, tries to catch over those blocks of time. The Nakamoto’s logic allows me to guess the right time frame, in the first place, and my relative chances in competition. Is there any period of time, over which I can reasonably expect my idea to take over the whole community, sort of qz = 1 ? This value z can also be my time advantage over other projects. If yes, this will be my maximal planning horizon. If not, I just simulate my qz with different extensions of time (different values of z), and I try to figure out how does my odds change as z changes.

If, instead of moving through time, I am moving across the capital market, my initial question changes: is there any amount of capital, like any amount z of capital chunks, which makes my qz = 1 ? If yes, what is it? If no, what schedule of fundraising should I adopt?

Mind you, this is a race: the greater my z, the lower my qz. The more time I have to cover in order to have my project launched, the lower my chances to ever catch on. This is a notable difference between the Bayesian framework and that by Satoshi Nakamoto. The former says: your chances to succeed grow as the size of your target zone grows in relation to everything that can possibly happen. The more flexible you are, the greater are your chances of success. On the other hand, in the Nakamoto’s framework, the word of wisdom is different: the greater your handicap over other projects, ideas, people and whatnot, in terms of time or resources to grab, the lower your chances of succeeding. The total wisdom coming from that is: if I want to design a business plan for those local, green energy systems, I have to imagine something flexible (a large zone of target states), and, in the same time, something endowed with pretty comfortable a pole position over my rivals. I guess that, at this point, you will say: good, you could have come to that right at the beginning. ‘Be flexible and gain some initial advantage’ is not really science. This is real life. Yes, but what I am trying to demonstrate is precisely the junction between the theory of probability and real life.

[1] Mr. Bayes, and Mr Price. “An essay towards solving a problem in the doctrine of chances. by the late rev. mr. bayes, frs communicated by mr. price, in a letter to john canton, amfrs.” Philosophical Transactions (1683-1775) (1763): 370-418

Thomas Bayes, Satoshi Nakamoto et bigos

Mon éditorial

J’hésite entre continuer à explorer la logique mathématique de Thomas Bayes (Bayes, Price 1763[1]), et celle de Satoshi Nakamoto, le fondateur mystérieux de Bitcoin.. Je me dis qu’il serait intéressant d’être bien polonais, cette fois. Chez nous, en Pologne, nous avons un plat appelé « bigos » : un peu comme la choucroute française, mais avec plus de prédilection pour mélanger des ingrédients divers, dans une base faite de choux cuit. Du choux cuit, ça a une odeur si forte que quoi que vous y ajoutiez servira à mitiger et affiner. Mes choux c’est l’idée de systèmes énergétiques locaux basés sur les énergies renouvelables (choux) et la théorie de probabilité c’est l’eau pour le cuire. Je pense qu’il est intéressant de mélanger, dans cette base, Thomas Bayes et Satoshi Nakamoto façon « bigos ».

Avec Thomas Bayes j’entre donc un univers essentiellement spatial et géométrique, où tout ce qui peut possiblement se passer et défini comme un rectangle ABCD et où deux balles jetées l’une après l’autre simulent les évènements dont l’occurrence m’intéresse le plus. Alors que la première balle, que Thomas Bayes appelle « W », soit jetée sur le rectangle, elle s’arrête en un point défini. On trace une ligne droite, parallèle à AD, à travers ce point. Elle coupe les côtés CD et AB en des points dénommés respectivement « s » et « o ». Voilà que mon univers se rétrécit à un rectangle plut petit, compris entre le côté AD du grand rectangle et la droite s_o. Comme je jette ma deuxième balle, dénommée « O » dans la notation originelle de Bayes, je la jette plusieurs fois, ou « n ». Si la balle O tombe dedans ce petit rectangle, entre le côté AD et la droite s_o, c’est un succès que Thomas Bayes dénomme M. Le nombre de fois que j’achève ce succès M est symbolisé avec « p », et le nombre d’échecs (pas de M, désolé) porte le symbole de q.

Avec Satoshi Nakamoto, je plonge dans un univers de transactions financières effectuées façon Blockchain, donc comme endossage consécutif garanti par une chaîne des registres dans un réseau. Selon la définition initiale de la part de Satoshi Nakamoto : « Nous considérons le scenario d’un agresseur qui essaie de générer une chaîne alternative (de transactions) plus vite que se constitue la chaîne honnête. Même si ceci est accompli, ça n’ouvre pas le système aux changements arbitraires, comme la création de valeur à partir du néant ou prendre l’argent qui n’a jamais appartenu à l’agresseur. Les nœuds du réseau ne vont pas accepter une transaction non-valide comme paiement, et les nœuds honnêtes n’accepteront jamais un registre qui les contient. Un agresseur peut seulement essayer de changer une de ses propres transactions pour reprendre l’argent qu’il a récemment dépensé ».   

L’intentionnalité est la première différence notable entre ces deux univers de probabilité : celui de Thomas Bayes et celui de Satoshi Nakamoto. La logique Bayésienne considère les évènements étudiés comme le résultat du pur hasard ou d’un processus si complexe et inconnu que de notre point de vue c’est du hasard. La logique de Bitcoin c’est un univers d’actions intentionnelles où on parle de succès ou échec dans l’accomplissement d’un objectif. Voilà du « bigos » intéressant. La deuxième différence, plus abstraite et peut-être plus subtile, est la façon de définir le succès de l’action. Chez Thomas Bayes, le succès consiste à se trouver, lorsque tout a été fait et dit, dans une gamme d’états possibles, genre entre la frontière de mon univers et une droite qui le coupe en deux. Chez Nakamoto, l’agresseur peut parler du succès si et seulement s’il accomplit un objectif très concret, c’est-à-dire s’il réussit à annuler ses propres paiements et faire revenir le pognon dans sa poche.

Si j’utilise ces deux cadres de référence pour aborder, de façon scientifique, mon idée de systèmes énergétiques locaux, avec mes quatre conditions Q(E) = D(E) = S(RE) ; P(E) ≤ PP(E) ; ROA ≥ ROA*, W/M(T1) > W/M(T0), la logique Bayésienne me dit que les valeurs de référence dans mon business plan seront plus ou moins exogènes à mes efforts : elles seront comme la position de cette première balle W. La demande d’énergie D(E), le pouvoir d’achat individuel PP(E) par rapport à cette énergie, la valeur de référence ROA* pour mon taux de retour sur actifs, ainsi que la proportion initiale W/M(T0) entre les transactions W, payées avec le Wasun, la monnaie virtuelle locale, et celles effectuées en monnaie officielle M : tout ça sera donné objectivement, plus ou moins. Alors que j’ai ces repères, je peux soit continuer dans la logique Bayésienne – et étudier la probabilité de tout un éventail des situations qui remplissent mes conditions générales – soit suivre la logique de Satoshi Nakamoto et essayer de décrire des succès et des échecs possibles en des termes très, très précis.

La logique de Thomas Bayes semble reposer, dans une large mesure, sur la lemme 1, qu’il formule juste après avoir tracé cet univers rectangulaire ABCD avec deux balles jetées dedans : « La probabilité que le point o tombera entre une paire quelconque des points sur le côté AB (du rectangle ABCD) est la proportion de la distance entre ces deux points à la longueur totale de AB ». Pour ceux qui sont juste modérément fanas des maths : une lemme est une sorte de théorème adjacent, comme instrumental au théorème principal. Une lemme est donc une hypothèse prouvée, genre en passant, dans le cadre d’une preuve plus large. Thomas Bayes offre une preuve géométrique très élaborée de cette lemme, encore que moi, personnellement, je pense qu’il est plus intéressant de démontrer le sens de cette proposition dans la vie réelle, plutôt que suivre un chemin géométrique rigoureux. Alors voilà : vous tournez le dos à un arbre et vous jetez des pierres par-dessus votre épaule, sans regarder. Vous avez une sorte d’univers derrière vous, qui est fait de toutes les endroits possibles où vos pierres peuvent atterrir. Dans cet univers, il y a comme un sous-univers fait de l’arbre. Chaque fois qu’une pierre touche l’arbre, l’évènement compte comme succès. Sinon, c’est un échec. Le bon sens dit que plus gros est cet arbre derrière vous, par rapport à votre champ de tir complet, plus grandes sont les chances que vos pierres frappent l’arbre. La logique opérationnelle derrière cette lemme est tout aussi terre-à-terre : plus larges sont les limites de ce que je définis comme succès, par rapport à la taille entière de mon univers de probabilité, plus grandes sont mes chances d’achever ce succès. Si une fille cherche un gars de haute taille comme candidat pour fiançailles, la probabilité d’en trouver un entre 175 centimètres et 2 mètres dix est plus grande que de trouver un futur père de ses enfants qui aie exactement 189 centimètres.

La logique Bayésienne implique donc que je définisse mon succès comme un éventail de situations possibles. En revanche, Satoshi Nakamoto suit une logique de séquence temporelle. Une situation a deux résultats possibles : soit l’agresseur réussit à rempocher son argent de façon frauduleuse, soit il échoue. La probabilité de Nakamoto est basée sur le nombre de pas nécessaires pour achever le résultat. Plus de nœuds dans le réseau l’agresseur devra dominer, par rapport au nombre total des nœuds, plus il lui sera difficile d’atteindre son but. Plus de nœuds honnêtes nous avons dans le réseau, en proportions à la taille totale du réseau, plus il est facile d’en garder l’intégrité financière. Nakamoto parle de séquence puisque le fait d’atteindre chaque nœud et essayer de le dominer est un pas séparé dans la séquence d’actions entreprises par l’agresseur. Remarquez : c’est la même logique de base que chez Bayes, la logique des proportions, mais représentée comme une chaîne d’évènements plutôt que comme un univers plat et statique.

En revenant à mes oignons, je peux appréhender mon concept général de ces deux façons distinctes. Je peux définir mon objectif de la façon que j’ai déjà montré – Q(E) = D(E) = S(RE) ; P(E) ≤ PP(E) ; ROA ≥ ROA*, W/M(T1) > W/M(T0) – ou bien je peux représenter ces conditions comme des séquences d’actions et les décrire en termes du nombre de pas nécessaires. Combien de clients dois-je acquérir pour pouvoir achever Q(E) = D(E) = S(RE) ? Combien de nœuds ai-je besoin de créer dans mon réseau de Wasun pour achever W/M(T1) > W/M(T0) ? Je peux aussi muter cette logique (Nakamotienne ?) un tout petit peu et remplacer la dimension temps par une dimension ressources : combien de capital je dois investir pour atteindre mes objectifs etc. ?

[1] Mr. Bayes, and Mr Price. “An essay towards solving a problem in the doctrine of chances. by the late rev. mr. bayes, frs communicated by mr. price, in a letter to john canton, amfrs.” Philosophical Transactions (1683-1775) (1763): 370-418

Time puts order in the happening

My editorial

I am developing on what I have done so far. The process, I believe, is called ‘living’, in general, but I am approaching just a tiny bit of it, namely my latest developments on making a local community run at 100% on green energy (see my latest updates “Conversations between the dead and the living (no candles)” and ‘Quelque chose de rationnellement prévisible’). I am working with the logic of Bayesian statistics, and more specifically with the patient zero of this intellectual stream, reverend Thomas Bayes in person (Bayes, Price 1763[1]). I have those four conditions, which, taken together, define my success:

Q(RE) = S(RE) = D(E) << 100% of energy from local green sources

and

P(RE) ≤ PP(E) << price of renewable energy, within individual purchasing power

and

ROA ≥ ROA* << return on assets from local green installations superior or equal to a benchmark value

and

W/M(T1) > W/M(T0) << a local virtual currency based on green energy takes on the market, progressively

Now, as I study the original writing by Thomas Bayes, and as I read his geometrical reasoning, I think I should stretch a little the universe of my success. Stretching universes allows a better perspective. Thomas Bayes defines the probability of a p successes and q failures in p + q = n trials as E*ap*bq, where a and b are the simple probabilities of, respectively, p and q happening just once, and E is the factor of ap*bq, when you expand the binomial (a + b)p+q. That factor is equal to E = pq/q!, by the way. Thank you, Isaac Newton. Thank you, Blaise Pascal. Anyway, if I define my success as just one success, so if I take p = 1, it makes no sense. That Bayesian expression tends to yield a probability of success equal to 100%, in such cases, which, whilst comforting in some way, sounds just stupid. A universe made of one hypothetical success, and nothing but failures fault of success, seems a bit rigid for the Bayesian approach.

And so I am thinking about applying those four conditions to individuals, and not necessarily to whole communities. I mean, my success would be one person fulfilling all those conditions. Let’s have a look. Conditions 1 and 2, no problem. One person can do Q(RE) = S(RE) = D(E), or consume as much energy as they need and all that in green. One person can also easily P(RE) ≤ PP(E) or pay for that green energy no more than their purchasing power allows. With condition 4, it becomes tricky. I mean, I can imagine that one single person uses more and more of the Wasun, or that local cryptocurrency, and that more and more gets bigger and bigger when compared to the plain credit in established currency that the same person is using. Still, individual people hold really disparate monetary balances: just compare yourself to Justin Bieber and you will see the gap. In monetary balances of significantly different a size, structure can differ a lot, too. Thus, whilst I can imagine an individual person doing W/M(T1) > W/M(T0), that would take a lot of averaging. As for condition 3, or ROA ≥ ROA*, I think that it just wouldn’t work at the individual level. Of course, I could do all that sort of gymnastics like ‘what if the local energy system is a cooperative, what if every person in the local community has some shares in it, what if their return on those shares impacted significantly their overall return on assets etc.’ Honestly, I am not feeling the blues, in this case. I just don’t trust too many whatifs at once. ROA is ROA, it is an accounting measure, I like it solid and transparent, without creative accounting.

Thus, as I consider stretching my universe, some dimensions look more stretchable than others. Happens all the time, nothing to inform the government about, and yet educative. The way I formulate my conditions of success impacts the way I can measure the odds of achieving it. Some conditions are more flexible than others, and those conditions are more prone to fancy mathematical thinking. Those stiff ones, i.e. not very stretchable, are something the economists don’t really like. They are called ‘real options’ or ‘discreet variables’ and they just look clumsy in a model. Anyway, I am certainly going to return to that stretching of my universe, subsequently, but now I want to take a dive into the Bayesian logic. In order to get anywhere, once immersed, I need to expand that binomial: (a + b)p+q. Raising anything to a power is like meddling with the number of dimensions the thing stretches along. Myself, for example, raised to power 0.75, or ¾, means that first, I gave myself a three-dimensional extension, which I usually pleasantly experience, and then, I tried to express this three-dimension existence with a four-dimensional denominator, with time added to the game. As a result, after having elevated myself to power 0.75, I end up with plenty of time I don’t know what to do with. Somehow familiar, but I don’t like it. Dimensions I don’t know what to do with look like pure waste to me. On the whole, I prefer elevating myself to integers. At least, I stay in control.

This, in turn, suggests a geometrical representation, which I indeed can find with Thomas Bayes. In Section II of this article, Thomas Bayes starts with writing the basic postulates: ‘Postulate 1. I suppose the square table or plane ABCD to be so levelled that if either of the balls O or W be thrown upon it, there shall be the same probability that it rests upon any one equal part of the plane or another, and that it must necessarily rest somewhere upon it. Postulate 2. I suppose that the ball W will be first thrown, and through the point where it rests a line ‘os’ shall be drawn parallel to AD, and meeting CD and AB in s and o; and that afterwards the ball O will be thrown p + q = n times, and that its resting between AD and os after a single throw be called the happening of the event M in a single trial’. OK, so that’s the original universe by reverend Bayes. Interesting. A universe is defined, with a finite number of dimensions. Anyway, as I am an economist, I will subsequently reduce any number of dimensions to just two, as reverend Bayes did. As my little example of elevating myself to power 0.75 showed, there is no point in having more dimensions than you can handle. Two is fine.

In that k-dimensional universe, two events happen, in a sequence. The first one is the peg event: it sets a reference point, and a reference tangent. That tangent divides the initial universe into two parts, sort of on the right of the Milky Way as opposed to all those buggers on the left of it. The, the second event happens, and this one is me in action: I take n trials with p successes and q failures. Good. As I am quickly thinking about it, it gives me always one extra dimension over the k dimensions in my universe. That extra dimension is order rather than size. In the original notation by Thomas Bayes, he has two dimensions in his square, and then time happens, and two events happen in that time. Time puts order in the happening of the two events. Hence, that extra dimension should be sort of discrete, with well-defined steps and no available states in between. I have two states of my k-dimensional universe: state sort of 1 with just the peg event in it, and sort of state 2, with my performance added inside. State 1 narrows down the scope of happening in state 2, and I want to know the odds of state 2 happening within that scope.

Now, I am thinking about ball identity. I mean, what could make that first, intrepid ball W, which throws itself head first to set the first state of my universe. From the first condition, I take the individual demand for energy: D(E). The second condition yields individual purchasing power regarding energy PP(E), the third one suggests the benchmark value regarding the return on assets ROA*. I have a bit of a problem with the fourth condition, but after some simplification I think that I can take time, just as reverend Bayes did. My W ball will be the state of things at the moment T0, regarding the monetary system, or W/M(T0). Good, so my universe can get some order through four moves, in which I set four peg values, taken from the four conditions. The extra dimension in my universe is precisely the process of setting those benchmarks.

[1] Mr. Bayes, and Mr Price. “An essay towards solving a problem in the doctrine of chances. by the late rev. mr. bayes, frs communicated by mr. price, in a letter to john canton, amfrs.” Philosophical Transactions (1683-1775) (1763): 370-418

Quelque chose de rationnellement prévisible

Mon éditorial

Ça y est, je me suis relancé. Mardi et mercredi, je finissais cet article sur les modèles évolutionnistes appliqués aux changements technologiques. Vous pouvez le voir et télécharger ici.  Faute de temps, je n’avais rien mis sur ce blog. Hier, j’ai déjà amorcé une nouvelle course, dans ma mise à jour en anglais (voir : “Conversations between the dead and the living (no candles)” ) et je veux bien continuer. D’abord, une petite récapitulation : je reste dans le monde du changement technologique et je joue avec les probabilités. Je suis retourné à cette idée, vieille de quelques mois, des systèmes énergétiques locaux basés sur les énergies renouvelables et associés avec le développement des monnaies locales, que jadis j’avais baptisé le Wasun. Vous pouvez consulter, par exemple,  ‘Les moulins de Wasun’  pour vous rafraîchir la mémoire. De toute façon, j’ai décidé d’approcher cette idée, cette fois, sous l’angle de la théorie de probabilité d’évènements rares. Je continue donc avec les notions fondamentales de Thomas Bayes (Bayes, Price 1763[1]), ainsi qu’avec la théorie de Siméon Denis Poisson, surtout dans sa forme utilisée par le soi-disant fondateur de l’idée de Bitcoin, Satoshi Nakamoto.

Je procède par ordre d’ancienneté et je commence par la théorie de Bayes dans sa pure forme. Il faut que je définisse un évènement, complexe et à contours un peu flous, si possible, qui correspond au succès dans cet univers. Je le définis avec quatre conditions. Condition no. 1 est que le marché d’énergie Q(E) dans une communauté locale consiste à 100% d’énergie renouvelable produite localement. Il faut donc que la demande locale d’énergie, ou D(E), soit égale à l’offre locale S(RE) d’énergie renouvelable. Mathématiquement, cela veut dire Q(E) = D(E) = S(RE). Condition no. 2 stipule que le prix d’énergie P(E) dans ce marché soit dans la limite du pouvoir d’achat moyen PP(E), donc que P(E) ≤ PP(E). Condition no. 3 se réfère au côté capitaliste du projet et elle exige que le taux de retour sur actifs ROA (bénéfice net divisé par la valeur comptable d’actifs) soit supérieur ou égal à une valeur de référence ROA*, ou ROA ≥ ROA*. Finalement, je veux que l’offre W de la monnaie virtuelle locale accroisse systématiquement sa part du marché local par rapport à l’offre M de la monnaie ‘officielle’. Avec deux périodes consécutives T0 et T1, ma condition no. 4 peut donc être exprimée comme W/M(T1) > W/M(T0).

J’ai donc quatre conditions qui doivent être remplies pour que je puisse parler d’un succès dans le lancement d’un projet local d’énergie renouvelable. J’utilise cet exemple pour jouer un peu avec la théorie de probabilité et à ce moment précis, je veux un petit échange posthume d’idées avec Thomas Bayes. Pour comprendre la théorie de Bayes, il est bon de se demander nous-mêmes qu’est-ce que la probabilité dans notre vie quotidienne. La probabilité que nous apprenons à l’école est un nombre. On jette une pièce de monnaie 100 fois, et on calcule le nombre d’occurrence de la pile et de la face. Disons que pile à fait 30 apparitions dans cet échantillon de 100. Alors, on calcule la probabilité que ce soit pile qui est sur le dessus de la pièce après le jet comme P = 30/100 = 0,3. C’est fait. Seulement, on a justement accompli un paradoxe. Si un évènement est probable, il est incertain. Si j’ai un nombre bien défini, comme P = 0,3, je n’ai plus d’incertitude. La probabilité que nous venons de calculer est dure comme fer. Pardon, elle semble dure comme fer. C’est une fausse certitude en ce qui concerne l’avenir. Quand on y regarde bien, ce P = 0,3 c’est du passé, pendant que la question de base en ce qui concerne la probabilité est « Qu’est-ce qui va se passer ? ». Quelle garantie ai-je, sur la base ce ces 100 essais, que dans les 10 prochains essais j’aurais 3 piles et 7 faces ?

A partir de là, c’est la vraie théorie de probabilité qui commence. Il y a deux chemins fondamentaux à prendre : celui de de Moivre – Laplace ou bien celui de Thomas Bayes. Le premier est le mieux connu aujourd’hui comme « la loi des moyennes ». Je peux répéter mes expériences, par exemple en faisant 100 séries de 100 coups de pile, 10 000 au total. Dans chaque centaine, je calcule mes probabilités. Les probabilités collectées de 100 séries vont converger vers une moyenne. En fait, lorsque la variation, de centaine en centaine, autour de cette moyenne, se stabilisera, je saurai alors que cette moyenne est LA Probabilité des probabilités. Ce théorème, que la moyenne d’un ensemble d’observations est la valeur espérée future pour d’autres observations est le fondement de la statistique moderne et je peux dire sans trop d’exagération que sans ce théorème, on en serait toujours à la science façon Saint Thomas d’Aquin, donc on serait déterministe.

Thomas Bayes a adopté une autre approche. Il avait ce pressentiment général que dans les décisions de la vie réelle, le plus souvent, on n’a pas 10 000 essais pour établir une moyenne avec confidence : on opère dans un univers très limité en termes du nombre d’essais. De plus, les évènements de la vie réelle sont complexes : ce sont plutôt des séquences hétérogènes d’évènements dont certains peuvent être qualifiés comme satisfaisants dans leurs résultats, pendant que les autres se placent en dehors de notre intervalle de tolérance. Son idée, à Thomas Bayes, était de formuler des scénarios alternatifs à propos de l’avenir, et essayer voir quelles conditions doivent être remplies pour que chacun de ces scenarios ait lieu. L’assomption théorique qu’il eût fait était l’idée d’un intervalle de probabilités : « Il y a une probabilité de 40% que mon avenir soit entre le scénario A et le scénario B ».

Lorsque je construis un business plan, comme pour cette idée de systèmes énergétiques locaux, c’est définitivement la logique Bayésienne qui prend le devant. Je fais face à un avenir incertain. J’ai de la science à utiliser, donc j’ai tout un tas de probabilités « dures », style de Moivre – Laplace, mais ces probabilités ne vont pas remplacer mon plan : elles peuvent me servir à le rendre plus solide, mais c’est moi qui dois tracer des scénarios alternatifs pour l’avenir et qui doit pondérer judicieusement entre l’ambition et le bon sens. Je réassume donc mes quatre conditions : Q(E) = D(E) = S(RE) ; P(E) ≤ PP(E) ; ROA ≥ ROA*, W/M(T1) > W/M(T0).

Maintenant, laissons parler Thomas Bayes. Si je veux p succès sur n essais, et donc je peux tolérer q = n – p échecs, et si je sais que la probabilité d’un seul succès est égale à « a » et donc que la probabilité d’un échec est de « b », Thomas Bayes me dit que la probabilité complexe de p succès et q échecs est égale à E*ap*bq, où E est le facteur de l’expression ap*bq obtenu après l’expansion de (a + b)p+q. C’est la proposition 7 de son essai. Alors, pour comprendre bien comment ça marche, il faut oublier la plupart de ce qu’on a appris à l’école. Bon, OK, oublier juste pour un instant. Faire abstraction de, plutôt. Si la probabilité de succès est de a et la probabilité d’échec est de b, et s’il n y a pas d’évènements non-qualifiables, comme devenir le premier ministre au lieu de devenir président, mon a + b doit faire 1 au total. Si j’élève 1 à quelle puissance que ce soit, ça fera toujours 1. Donc, l’expression (a + b)p+q = 1,00 ce qui n’est pas tout à fait la direction que je veux prendre. Il faut donc bien comprendre que le succès est quelque chose de complètement différent d’un échec et que « a » correspond à un état de choses radicalement opposé à celui symbolisé par « b ». Par conséquent, et c’est là que nous devons être vraiment souples, pendant qu’il est vrai qu’en général a = 1 – b, il vaut mieux oublier que « a + b = 1 ».

Ce (a + b)p+q c’est un binôme de Newton et on l’expand comme tel. Par conséquent, le facteur E de l’expression E*ap*bq est égal à « pq/q! » , où « q! » est la factorielle de q, donc 1*2*…*q.  Si je veux quatre succès et je peux tolérer six échecs sur un total de 10 essais, le terme E sera égal à E = 46/6! = 5,688888889 et cela me dit que j’ai entre 5 et 6 façons différentes de combiner 4 succès et 6 échecs sur un total de 10 essais, quoi que c’est plutôt 6 que 5.

Mon objectif quantifiable est Q(E) = D(E) = S(RE) ; P(E) ≤ PP(E) ; ROA ≥ ROA*, W/M(T1) > W/M(T0). Maintenant, si je veux utiliser quelle forme de probabilité que ce soit – Laplacienne ou Bayésienne – il faut que je précise combien de ces succès je veux avoir. La réponse que je vais donner à cette question va déterminer le genre de probabilisme que je vais entrer. Si je réponds « Je veux juste un succès. Je veux que ça marche dans un cas, le mien », j’ai un succès et zéro échecs. Essayons voir. J’ai une probabilité Bayésienne de E*11*00 d’avoir un succès certain et certainement pas d’échec. Mon E fait 10/0! = 1/1 = 1, et donc ma probabilité Bayésienne est égale à 1. J’ai 100% de succès. Idiot ? Peut-être, mais c’est justement là que nous voyons l’originalité de Bayes. Tu veux établir tes chances de succès de façon réaliste, mec ? Alors, imagine un univers, un ensemble d’évènements, donc soit une séquence, soit une concurrence spatiale et ça, c’est du rationnellement quantifiable. Je peux, par exemple, imaginer une projection dans le temps : « Durant les 10 années à venir je veux 4 années avec toutes les quatre conditions remplies ».

Si je veux donc prendre le chemin Bayésien dans ma recherche, il faut que j’imagine des alternatives réalistes en ce qui concerne mes conditions. Ensuite, je pourrais me servir d’une étude de marché pour calculer les probabilités simples de base, les Laplaciennes : la probabilité que Q(E) = D(E) = S(RE) et ainsi de suite. Alors, je pourrais évaluer les probabilités complexes, Bayésiennes que tout aille comme je le veux (quatre conditions remplies à la fois) et dire si mes espérances sont ne serait-ce qu’un peu réalistes. Si oui, je bâtis mon business plan avec l’objectif quantifiable comme précisé là-dessus. Sinon, je teste la probabilité complexe d’autres scénarios possibles jusqu’à que j’arrive à quelque chose de rationnellement prévisible.

[1] Mr. Bayes, and Mr Price. “An essay towards solving a problem in the doctrine of chances. by the late rev. mr. bayes, frs communicated by mr. price, in a letter to john canton, amfrs.” Philosophical Transactions (1683-1775) (1763): 370-418