## Calculating Value of Pi using Monte Carlo Technique – C PROGRAM

Recently in my Numerical Techniques class I learnt a Monte Carlo technique to calculate the value of Pi . The procedure is really…

## Central Limit Theorem Demonstration – C PROGRAM

One of the fundamental theorems of probability is the Central Limit Theorem. This theorem says that if is the sum of mutually independent…

## Acceptance-Rejection Method (Rejection Sampling) for generating distributions- C PROGRAM

Acceptance-Rejection method can be used to produce random numbers following a certain probability density function. This is done by generating random numbers following…

## Polynomial Fitting – C PROGRAM

Okay, so here I am sharing a code for fitting a polynomial to a given set of data-points using the Least Squares Approximation Method(Wikipedia).…

## Exponential Fitting – C PROGRAM

In this post I will be showing you how to write a code that fits the data-points to an exponential function, like: where,…

## Linear Fitting – C PROGRAM

In this post I am sharing a C program that uses the least-squares approximation (also known as Chi square minimization) to find the…

## Simulate a DICE THROW – C PROGRAM

In the last post I wrote about how to generate random numbers in a given range: [min, max]. In this post we will…

## Generate a RANDOM NO. in a given RANGE – C PROGRAM

In the last few posts I have written about generating random numbers and using them to simulate a coin flip or a 1-d…