# Playground 1.1: Performing Experiments

Last updated: January 13th, 2020
In [2]:
import pandas as pd


# Performing Experiments¶

Let's introduce a bigger dataset. This dataset was downloaded from Kaggle and it's called Toy Dataset because it's designed to play around with it, so we are going to use it to do some exercises and practice the new concepts we learn.

In [3]:
toy_dataset = pd.read_csv('toy_dataset.csv')

Out[3]:
Number City Gender Age Income Illness
0 1 Dallas Male 41 40367.0 No
1 2 Dallas Male 54 45084.0 No
2 3 Dallas Male 42 52483.0 No
3 4 Dallas Male 40 40941.0 No
4 5 Dallas Male 46 50289.0 No

Notice that in this dataset we still have a numbered person, their city and their age, but also their gender, their income and whether they have an illness or not.

In [4]:
toy_dataset.shape

Out[4]:
(150000, 6)

We can see as well that this dataset has $150000$ rows (people).

Let's start with a simple random experiment: Picking a person and printing their income.

In [6]:
income = toy_dataset.sample(1)['Income'].values[0]
income

Out[6]:
72414.0

Now, try and explore different possibilities for these kind of experiments: What if you choose more people? What if you print a different characteristic? What if you repeat the experiment until something happens?

In [ ]:



We could also try a deterministic experiment: Printing the age of the first person.

In [10]:
first_age = toy_dataset['Age'].loc[0]
first_age

Out[10]:
41

Now perform some deterministic experiments yourself!

In [ ]: