The fair premium in lottery games can be defined as the expected pay-off. For example, consider the game where you ... Read moreSt. Petersburg Paradox
[Read more...]
Back in 2001 when I entered university to study Statistics, our professor told us that “Statistics is a perfect way ... Read moreSimpson’s Paradox and Misleading Statistical Inference
We will provide you an example of how you can start building your predictive sport model, specifically for soccer, but ... Read moreHow to Build a Predictive Soccer Model
Most commonly a distribution is described by its mean and variance which are the first and second moments respectively. Another ... Read moreSkewness and Kurtosis in Statistics
When we are dealing with unbalanced classes in Machine Learning projects there are many approaches that you can follow. Just ... Read moreUndersampling by Groups in R
[Read more...]
Abstract Our goal is to provide some summary statistics of deaths across countries during the 1st Wave of Covid-19 and ... Read moreExcess Deaths during the 1st Wave of Covid-19
Assume that you have a list and you want to get the n-th element of each component or generally to ... Read moreHack: The ‘[‘ in R lists
[Read more...]
When I run quires in SQL (or even HiveQL, Spark SQL and so on), it is quite common to use ... Read moreHack: The “count(case when … else … end)” in dplyr
When we share an R script file with someone else, we assumed that they have already installed the required R ... Read moreHack: How to Install and Load Packages Dynamically
[Read more...]
The data that we want to get could be in different places and in different formats. We will provide some ... Read moreHow to get Data from Different Sources in R
Let’s say that we want to convert all Character Variables to Factors and we are dealing with a large data ... Read moreHack: How to Convert all Character Variables to Factors
A very common task in data processing is the transformation of the numeric variables (continuous, discrete etc) to categorical by ... Read moreHow to Convert Continuous variables into Categorical by Creating Bins
Compare Read and Write files time When we are dealing with large datasets, and we need to write many csv ... Read moreThe fastest way to Read and Writes file in R
Few words about Thompson Sampling Thompson Sampling is an algorithm for decision problems where actions are taken in sequence balancing ... Read moreMulti-Armed Bandit with Thompson Sampling
During the interview process for Data Science positions, it is likely to be asked to calculate Combinations or Permutations. Today ... Read morePermutations in R
[Read more...]