# Tag Archives: statistics

## New Book: The Modern C# Challenge

My latest book, The Modern C# Challenge, is now available. It’s a collection of 100 programming challenges that let you test your ability in a wide variety of programming topics, many of which are not usually covered in traditional programming … Continue reading

## Find two sets where the median of one is the mean of the other and vice versa in C#

For an upcoming book, I wanted to find sets where the mean (average) of one is the median (middle value) of the other and vice versa. I wanted to avoid trivial examples such as {1, 1, 1} and where the … Continue reading

Posted in algorithms, combinatorics | | Leave a comment

## Make a dice-rolling simulation in C#

This example performs a simulation of rolling two six-sided dice. It’s related to my book Interview Puzzles Dissected, which includes several examples that involve rolling dice. When you enter a number of trials and click Roll, the program uses the … Continue reading

Posted in algorithms, graphics, mathematics | | Leave a comment

## Plot data with standard deviation ranges in C#

The examples Draw a normal distribution curve in C# and Draw a scaled normal distribution in C# show one approach for visualizing how data is distributed. This example shows a method that lets you visualize where a particular data value … Continue reading

## Draw a scaled normal distribution in C#

The example Draw a normal distribution curve in C# shows how to draw a normal distribution. Unfortunately for some means and standard deviations, the result may not be very useful. For example, Figure 1 shows a normal distribution where the … Continue reading

## Draw a normal distribution curve in C#

A normal distribution is a probability distribution that occurs arise when you analyze seemingly “random” occurrences. You can define a normal distribution in terms of its mean and standard deviation. Mean (μ) This is the basically the average of the … Continue reading