I am a Ph.D. researcher, enjoying explaining complex things in simple terms || marcelmoos.com || Follow for more: marcelmoos.com/newsletter

# Five Paradoxes With Probabilities That Will Puzzle You

## Or can you outsmart them?

In our daily life, we constantly deal with uncertain situations. So — at least subconsciously — we are confronted with probabilities all the time. Moreover, it seems we have a good intuitive feeling for probabilities. Or do we really?

We know that flipping a coin 100 times will result in about 50 heads and 50 tails. Also, it’s clear to us that the probability of bumping into a friend on holidays abroad is very low, though not zero. However, there are situations when correct predictions following from probability theory are completely counter-intuitive.

Let’s dive into five paradoxes in probability theory…

# Flip a Coin on a Real Quantum Computer in Python

## Generate true randomness with a fun do-it-yourself beginner experiment.

Quantum computers can generate truly random numbers. That’s something a traditional computer cannot do without relying on external sources. Traditional computers can only generate numbers that appear to be random but in reality, are computed according to fixed rules. These numbers are called pseudo-random. If we generate enough of these pseudo-random numbers we will notice that they eventually repeat.

# What Really IS a Matrix Determinant?

## The geometric intuition behind determinants could change how you think about them.

Thinking back to my high-school years, linear algebra was a topic I was particularly fascinated with. It gave me the skill to solve large systems of linear equations and a geometric perspective on the problem making the whole process intuitive.

However, regarding matrix determinants, I was taught that they are numbers for matrices, how to compute them, and not much more. It took until my university courses that I learned the beauty behind determinants.

As soon as I learned about determinants’ geometric meaning, I was wondering why this wasn’t already taught in high school as it is very easy to…

# Run Your Python Code as Fast as C

## How you can supercharge the performance of your python code without changing a thing.

As a PhD researcher, it is crucial for my job to quickly code up an idea to see if it works or not. Python is an excellent tool enabling just that. It allows for focusing on the idea itself and not be bothered with boilerplate code and other tedious things.

However, Python comes with a major drawback: It is much slower than compiled languages like C or C++. So, what do we do after we tested an idea by building a Python prototype and now we want to turn it into a fast and performant tool? Most often than not…

# Monads Are Just Fancy Semicolons

## Monads can be scary — treating them like fancy semicolons makes them fun!

Monads are programmable semicolons. That’s it. For a programmer, a monad provides functions that allow for sequencing actions. Moreover, between every two following actions, a specific code snippet is executed.

So, a monad is a semicolon — but one whose exact behavior you can configure.

# Let’s Take a Step Back and Start Slow

In imperative languages like C or Java, semicolons are used to express a sequence of operations. The code in front of the semicolon is executed before the code after the semicolon. …

# The One-Sentence Proof in Multiple Sentences

Fermat’s theorem on sums of two squares had famously been proven in just one single sentence.

Can prime numbers be written as the sum of two squares? For 13 this is possible (2²+3²), but for example, 3 cannot be written in this way. Pierre de Fermat came up with a theorem on this topic, for which Don Zagier, an American mathematician gave a proof, which astonishingly is just one sentence long.

Numberphile [1] [2] made a great video on the one-sentence proof of Zagier but left out some details. …

# Why knowing the future would crash the economy

## A thought experiment using game theory explains why we mustn’t know our future.

Game theory is a branch of mathematics with a lot of applications. Especially in economics, game theory plays a very important role. That’s the reason why a lot of mathematicians are presented with the Nobel prize in economics. A widely known example is John Forbes Nash, who’s life is illustrated in the movie “A beautiful mind”.

As the name “game theory” suggests, there are some kinds of games involved. In fact “game” is very broadly defined. It means a scenario where two (or more) perfectly rational “players” have to make some kind of decision. The decisions they make determine whether…

Get the Medium app