Book Image

Getting Started with Haskell Data Analysis

By : James Church
Book Image

Getting Started with Haskell Data Analysis

By: James Church

Overview of this book

Every business and organization that collects data is capable of tapping into its own data to gain insights how to improve. Haskell is a purely functional and lazy programming language, well-suited to handling large data analysis problems. This book will take you through the more difficult problems of data analysis in a hands-on manner. This book will help you get up-to-speed with the basics of data analysis and approaches in the Haskell language. You'll learn about statistical computing, file formats (CSV and SQLite3), descriptive statistics, charts, and progress to more advanced concepts such as understanding the importance of normal distribution. While mathematics is a big part of data analysis, we've tried to keep this course simple and approachable so that you can apply what you learn to the real world. By the end of this book, you will have a thorough understanding of data analysis, and the different ways of analyzing data. You will have a mastery of all the tools and techniques in Haskell for effective data analysis.
Table of Contents (8 chapters)

Normal distribution

In this section, we are going to see normal distribution. The formula for normal distribution is as follows:

I realize this formula is intense if you've never seen it before, but focus in on the parameter side instead of the actual formula side. There are only three parameters: x, µ and σ. x is the dataset, which represents the domain; µ represents the mean, where we want the mean of our dataset to be; and σ represents the standard deviation, or how thin or wide we want our dataset to be. Now, because this is a hairy formula I've already implemented it, and I'm going to paste it into our window. So, the following example shows our quick function for normal distribution, where you can see the three parameters:

We have mu, which represents the mean; sd, which represents the standard deviation; and x, which is the domain...