Category Archives: Statistics

The Coronavirus Curve – A simple simulator

Here is an implementation for a simple ODE simulation of the COVID-19 curve. The simulator runs based on a set of first order ordinary differential equations (ODEs). These equations are dependent and measure three values including the change in the … Continue reading

Posted in Linux, Machine Learning, programming, Python, Software, Statistics, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , | Leave a comment

Linear Transformation of Random Variables

Linear Transformation of Random Variables is a very basic yet important operation in Statistics results of which are extensively used in different methods and algorithms in Machine Learning. Assume is a linear function, , where, is a random variable, and … Continue reading

Posted in Machine Learning, MATLAB, Robotics, Statistics | Tagged , , , , , , , , , , , , , , | Leave a comment

Importance Sampling – A Tutorial

Problem: Compute an expectation over a probability density function , given only samples generated from a different probability density function . We call and the target distribution and proposal distribution respectively. Solution: Draw samples from Calculate the probability of each … Continue reading

Posted in Machine Learning, MATLAB, Optimization, Reinforcement Learning, Robotics, Software, Statistics | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 1 Comment

Probability – Basic Lesson 4

In the previous lesson, we saw the definition of Expectation. Here the definition of Variance (and Standard Deviation) is given. Variance means that how much variability is in around its mean value (expected value) , and it can be written … Continue reading

Posted in Machine Learning, Statistics, Thoughts | Tagged , , , , , , , , , | Leave a comment

Probability – Basic Lesson 3

Here I give an example for calculating Expectation and Variance for discrete random variables. The Expectation of a variable is the average value of a function under a probability and can be written as follows: in a continuous representation the … Continue reading

Posted in Machine Learning, Statistics, Thoughts | Tagged , , , , , , , , , | Leave a comment

Probability – Basic Lesson 2

Check out my previous post on the four main rules of probability first and come back to this post to see a very nice example. Example: Consider we have two boxes a blue and a green, there are a number … Continue reading

Posted in Machine Learning, Statistics, Thoughts | Tagged , , , , , , , , , , | Leave a comment

Probability – Basic Lesson 1

Main rules of probability that make life easier. Consider two random variables and , we denote the probability of X occurring as . Also means that the probability of given has happened and it is called the marginal probability. If … Continue reading

Posted in Machine Learning, Statistics, Thoughts | Tagged , , , , , , , , , , , , , , | Leave a comment

What is Expected Value? (simply explained with example)

If we have a random variable, that can take value with probability , value with probability and so on, then the expected value for this random variable can be calculated as: To simplify the problem, we can consider rolling a … Continue reading

Posted in Linux, Machine Learning, MATLAB, Statistics, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Random number generation with different probability distribution – MATLAB

When programming with MATLAB, often you need to generate random numbers either uniformly or with a normal distribution. There are two main functions, namely `rand` and `randn`, that take care of this problem. Here I want to show you a … Continue reading

Posted in Linux, Machine Learning, MATLAB, programming, Software, Statistics, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

How to carry out an operator with probability p – Optimization Algorithms

When implementing optimization algorithms, we often bump into this phrase: “an operator needs to be carried out with probability P”. For instance, this can happen when implementing the crossover or mutation phases in Evolutionary Algorithms. It means that you want … Continue reading

Posted in Linux, Machine Learning, MATLAB, Optimization, programming, Reinforcement Learning, Robotics, Software, Statistics, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment