100% found this document useful (4 votes)
32 views

Full Download Python Machine Learning Case Studies: Five Case Studies For The Data Scientist 1st Edition Danish Haroon PDF

Learning

Uploaded by

dutslauke
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
32 views

Full Download Python Machine Learning Case Studies: Five Case Studies For The Data Scientist 1st Edition Danish Haroon PDF

Learning

Uploaded by

dutslauke
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Download the full version of the textbook now at textbookfull.

com

Python Machine Learning Case Studies: Five


Case Studies for the Data Scientist 1st
Edition Danish Haroon

https://textbookfull.com/product/python-machine-
learning-case-studies-five-case-studies-for-the-
data-scientist-1st-edition-danish-haroon/

Explore and download more textbook at https://textbookfull.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Python Machine Learning Case Studies: Five Case Studies


for the Data Scientist 1st Edition Danish Haroon

https://textbookfull.com/product/python-machine-learning-case-studies-
five-case-studies-for-the-data-scientist-1st-edition-danish-haroon-2/

textbookfull.com

The Family Nurse Practitioner: Clinical Case Studies (Case


Studies in Nursing) Leslie Neal-Boylan

https://textbookfull.com/product/the-family-nurse-practitioner-
clinical-case-studies-case-studies-in-nursing-leslie-neal-boylan/

textbookfull.com

Transit Oriented Development Learning from International


Case Studies Ren Thomas

https://textbookfull.com/product/transit-oriented-development-
learning-from-international-case-studies-ren-thomas/

textbookfull.com

Rescue Run 1st Edition Don Pendleton

https://textbookfull.com/product/rescue-run-1st-edition-don-pendleton/

textbookfull.com
Between Giants The Battle for the Baltics in World War II
General Military Buttar Prit

https://textbookfull.com/product/between-giants-the-battle-for-the-
baltics-in-world-war-ii-general-military-buttar-prit/

textbookfull.com

Adaptation to Climate Change in Agriculture Research and


Practices Toshichika Iizumi

https://textbookfull.com/product/adaptation-to-climate-change-in-
agriculture-research-and-practices-toshichika-iizumi/

textbookfull.com

Run the world my 3 500 mile journey through running


cultures around the globe First Edition Wade

https://textbookfull.com/product/run-the-world-my-3-500-mile-journey-
through-running-cultures-around-the-globe-first-edition-wade-2/

textbookfull.com

Boundary and Interior Layers Computational and Asymptotic


Methods BAIL 2018 Gabriel R. Barrenechea

https://textbookfull.com/product/boundary-and-interior-layers-
computational-and-asymptotic-methods-bail-2018-gabriel-r-barrenechea/

textbookfull.com

Spanish for pediatric medicine a practical communication


guide 3rd Edition Edward Machtinger

https://textbookfull.com/product/spanish-for-pediatric-medicine-a-
practical-communication-guide-3rd-edition-edward-machtinger/

textbookfull.com
Political Confidence and Democracy in Europe Christian
Schnaudt

https://textbookfull.com/product/political-confidence-and-democracy-
in-europe-christian-schnaudt/

textbookfull.com
Python
Machine Learning
Case Studies
Five Case Studies for the Data Scientist

Danish Haroon
Python Machine
Learning Case
Studies
Five Case Studies for the
Data Scientist

Danish Haroon
Python Machine Learning Case Studies
Danish Haroon
Karachi, Pakistan
ISBN-13 (pbk): 978-1-4842-2822-7 ISBN-13 (electronic): 978-1-4842-2823-4
DOI 10.1007/978-1-4842-2823-4
Library of Congress Control Number: 2017957234
Copyright © 2017 by Danish Haroon
This work is subject to copyright. All rights are reserved by the Publisher, whether the whole
or part of the material is concerned, specifically the rights of translation, reprinting, reuse of
illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical
way, and transmission or information storage and retrieval, electronic adaptation, computer
software, or by similar or dissimilar methodology now known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark
symbol with every occurrence of a trademarked name, logo, or image we use the names, logos,
and images only in an editorial fashion and to the benefit of the trademark owner, with no
intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if
they are not identified as such, is not to be taken as an expression of opinion as to whether or not
they are subject to proprietary rights.
While the advice and information in this book are believed to be true and accurate at the
date of publication, neither the authors nor the editors nor the publisher can accept any legal
responsibility for any errors or omissions that may be made. The publisher makes no warranty,
express or implied, with respect to the material contained herein.
Cover image by Freepik (www.freepik.com)
Managing Director: Welmoed Spahr
Editorial Director: Todd Green
Acquisitions Editor: Celestin Suresh John
Development Editor: Matthew Moodie
Technical Reviewer: Somil Asthana
Coordinating Editor: Sanchita Mandal
Copy Editor: Lori Jacobs
Compositor: SPi Global
Indexer: SPi Global
Artist: SPi Global
Distributed to the book trade worldwide by Springer Science+Business Media New York,
233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505,
e-mail [email protected], or visit www.springeronline.com. Apress Media, LLC is
a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc
(SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail [email protected], or visit
http://www.apress.com/rights-permissions.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook
versions and licenses are also available for most titles. For more information, reference our Print
and eBook Bulk Sales web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available
to readers on GitHub via the book’s product page, located at www.apress.com/978-1-4842-2822-7.
For more detailed information, please visit http://www.apress.com/source-code.
Printed on acid-free paper
Contents at a Glance

About the Author������������������������������������������������������������������������������ xi


About the Technical Reviewer�������������������������������������������������������� xiii
Acknowledgments��������������������������������������������������������������������������� xv
Introduction����������������������������������������������������������������������������������� xvii


■Chapter 1: Statistics and Probability���������������������������������������������� 1

■Chapter 2: Regression������������������������������������������������������������������ 45

■Chapter 3: Time Series����������������������������������������������������������������� 95

■Chapter 4: Clustering������������������������������������������������������������������ 129

■Chapter 5: Classification������������������������������������������������������������ 161

■Appendix A: Chart types and when to use them������������������������� 197

Index���������������������������������������������������������������������������������������������� 201

iii
Contents

About the Author������������������������������������������������������������������������������ xi


About the Technical Reviewer�������������������������������������������������������� xiii
Acknowledgments��������������������������������������������������������������������������� xv
Introduction����������������������������������������������������������������������������������� xvii


■Chapter 1: Statistics and Probability���������������������������������������������� 1
Case Study: Cycle Sharing Scheme—Determining Brand Persona�������� 1
Performing Exploratory Data Analysis����������������������������������������������������� 4
Feature Exploration�������������������������������������������������������������������������������������������������� 4
Types of variables����������������������������������������������������������������������������������������������������� 6
Univariate Analysis��������������������������������������������������������������������������������������������������� 9
Multivariate Analysis���������������������������������������������������������������������������������������������� 14
Time Series Components���������������������������������������������������������������������������������������� 18

Measuring Center of Measure��������������������������������������������������������������� 20


Mean����������������������������������������������������������������������������������������������������������������������� 20
Median�������������������������������������������������������������������������������������������������������������������� 22
Mode����������������������������������������������������������������������������������������������������������������������� 22
Variance������������������������������������������������������������������������������������������������������������������ 22
Standard Deviation������������������������������������������������������������������������������������������������� 23
Changes in Measure of Center Statistics due to Presence of Constants���������������� 23
The Normal Distribution������������������������������������������������������������������������������������������ 25

v
 ■ Contents

Correlation��������������������������������������������������������������������������������������������� 34
Pearson R Correlation��������������������������������������������������������������������������������������������� 34
Kendall Rank Correlation���������������������������������������������������������������������������������������� 34
Spearman Rank Correlation������������������������������������������������������������������������������������ 35

Hypothesis Testing: Comparing Two Groups������������������������������������������ 37


t-Statistics�������������������������������������������������������������������������������������������������������������� 37
t-Distributions and Sample Size����������������������������������������������������������������������������� 38

Central Limit Theorem��������������������������������������������������������������������������� 40


Case Study Findings������������������������������������������������������������������������������ 41
Applications of Statistics and Probability���������������������������������������������� 42
Actuarial Science���������������������������������������������������������������������������������������������������� 42
Biostatistics������������������������������������������������������������������������������������������������������������ 42
Astrostatistics��������������������������������������������������������������������������������������������������������� 42
Business Analytics�������������������������������������������������������������������������������������������������� 42
Econometrics���������������������������������������������������������������������������������������������������������� 43
Machine Learning��������������������������������������������������������������������������������������������������� 43
Statistical Signal Processing���������������������������������������������������������������������������������� 43
Elections����������������������������������������������������������������������������������������������������������������� 43


■Chapter 2: Regression������������������������������������������������������������������ 45
Case Study: Removing Inconsistencies in Concrete
Compressive Strength��������������������������������������������������������������������������� 45
Concepts of Regression������������������������������������������������������������������������ 48
Interpolation and Extrapolation������������������������������������������������������������������������������ 48
Linear Regression��������������������������������������������������������������������������������������������������� 49
Least Squares Regression Line of y on x���������������������������������������������������������������� 50
Multiple Regression������������������������������������������������������������������������������������������������ 51
Stepwise Regression���������������������������������������������������������������������������������������������� 52
Polynomial Regression������������������������������������������������������������������������������������������� 53

vi
 ■ Contents

Assumptions of Regressions����������������������������������������������������������������� 54
Number of Cases���������������������������������������������������������������������������������������������������� 55
Missing Data����������������������������������������������������������������������������������������������������������� 55
Multicollinearity and Singularity����������������������������������������������������������������������������� 55

Features’ Exploration���������������������������������������������������������������������������� 56
Correlation�������������������������������������������������������������������������������������������������������������� 58

Overfitting and Underfitting������������������������������������������������������������������� 64


Regression Metrics of Evaluation���������������������������������������������������������� 67
Explained Variance Score��������������������������������������������������������������������������������������� 68
Mean Absolute Error����������������������������������������������������������������������������������������������� 68
Mean Squared Error����������������������������������������������������������������������������������������������� 68
R2���������������������������������������������������������������������������������������������������������������������������� 69
Residual������������������������������������������������������������������������������������������������������������������ 69
Residual Plot����������������������������������������������������������������������������������������������������������� 70
Residual Sum of Squares��������������������������������������������������������������������������������������� 70

Types of Regression������������������������������������������������������������������������������ 70
Linear Regression��������������������������������������������������������������������������������������������������� 71
Grid Search������������������������������������������������������������������������������������������������������������� 75
Ridge Regression���������������������������������������������������������������������������������������������������� 75
Lasso Regression��������������������������������������������������������������������������������������������������� 79
ElasticNet��������������������������������������������������������������������������������������������������������������� 81
Gradient Boosting Regression�������������������������������������������������������������������������������� 82
Support Vector Machines���������������������������������������������������������������������������������������� 86

Applications of Regression�������������������������������������������������������������������� 89
Predicting Sales������������������������������������������������������������������������������������������������������ 89
Predicting Value of Bond����������������������������������������������������������������������������������������� 90
Rate of Inflation������������������������������������������������������������������������������������������������������ 90
Insurance Companies��������������������������������������������������������������������������������������������� 91
Call Center�������������������������������������������������������������������������������������������������������������� 91

vii
 ■ Contents

Agriculture�������������������������������������������������������������������������������������������������������������� 91
Predicting Salary���������������������������������������������������������������������������������������������������� 91
Real Estate Industry����������������������������������������������������������������������������������������������� 92


■Chapter 3: Time Series����������������������������������������������������������������� 95
Case Study: Predicting Daily Adjusted Closing Rate of Yahoo��������������� 95
Feature Exploration������������������������������������������������������������������������������� 97
Time Series Modeling��������������������������������������������������������������������������������������������� 98

Evaluating the Stationary Nature of a Time Series Object��������������������� 98


Properties of a Time Series Which Is Stationary in Nature������������������������������������� 99
Tests to Determine If a Time Series Is Stationary��������������������������������������������������� 99
Methods of Making a Time Series Object Stationary�������������������������������������������� 102

Tests to Determine If a Time Series Has Autocorrelation�������������������� 113


Autocorrelation Function�������������������������������������������������������������������������������������� 113
Partial Autocorrelation Function��������������������������������������������������������������������������� 114
Measuring Autocorrelation����������������������������������������������������������������������������������� 114

Modeling a Time Series����������������������������������������������������������������������� 115


Tests to Validate Forecasted Series���������������������������������������������������������������������� 116
Deciding Upon the Parameters for Modeling�������������������������������������������������������� 116

Auto-Regressive Integrated Moving Averages������������������������������������ 119


Auto-Regressive Moving Averages����������������������������������������������������������������������� 119
Auto-Regressive��������������������������������������������������������������������������������������������������� 120
Moving Average���������������������������������������������������������������������������������������������������� 121
Combined Model��������������������������������������������������������������������������������������������������� 122

Scaling Back the Forecast������������������������������������������������������������������� 123


Applications of Time Series Analysis��������������������������������������������������� 127
Sales Forecasting������������������������������������������������������������������������������������������������� 127
Weather Forecasting��������������������������������������������������������������������������������������������� 127
Unemployment Estimates������������������������������������������������������������������������������������� 127

viii
 ■ Contents

Disease Outbreak������������������������������������������������������������������������������������������������� 128


Stock Market Prediction��������������������������������������������������������������������������������������� 128


■Chapter 4: Clustering������������������������������������������������������������������ 129
Case Study: Determination of Short Tail Keywords for Marketing������� 129
Features’ Exploration�������������������������������������������������������������������������� 131
Supervised vs. Unsupervised Learning����������������������������������������������� 133
Supervised Learning��������������������������������������������������������������������������������������������� 133
Unsupervised Learning����������������������������������������������������������������������������������������� 133

Clustering�������������������������������������������������������������������������������������������� 134
Data Transformation for Modeling������������������������������������������������������� 135
Metrics of Evaluating Clustering Models�������������������������������������������������������������� 137

Clustering Models������������������������������������������������������������������������������� 137


k-Means Clustering���������������������������������������������������������������������������������������������� 137
Applying k-Means Clustering for Optimal Number of Clusters����������������������������� 143
Principle Component Analysis������������������������������������������������������������������������������ 144
Gaussian Mixture Model��������������������������������������������������������������������������������������� 151
Bayesian Gaussian Mixture Model������������������������������������������������������������������������ 156

Applications of Clustering������������������������������������������������������������������� 159


Identifying Diseases��������������������������������������������������������������������������������������������� 159
Document Clustering in Search Engines�������������������������������������������������������������� 159
Demographic-Based Customer Segmentation����������������������������������������������������� 159


■Chapter 5: Classification������������������������������������������������������������ 161
Case Study: Ohio Clinic—Meeting Supply and Demand��������������������� 161
Features’ Exploration�������������������������������������������������������������������������� 164
Performing Data Wrangling����������������������������������������������������������������� 168
Performing Exploratory Data Analysis������������������������������������������������� 172
Features’ Generation��������������������������������������������������������������������������� 178

ix
 ■ Contents

Classification��������������������������������������������������������������������������������������� 180
Model Evaluation Techniques������������������������������������������������������������������������������� 181
Ensuring Cross-Validation by Splitting the Dataset���������������������������������������������� 184
Decision Tree Classification���������������������������������������������������������������������������������� 185

Kernel Approximation�������������������������������������������������������������������������� 186


SGD Classifier������������������������������������������������������������������������������������������������������� 187
Ensemble Methods����������������������������������������������������������������������������������������������� 189

Random Forest Classification�������������������������������������������������������������� 190


Gradient Boosting������������������������������������������������������������������������������������������������� 193

Applications of Classification�������������������������������������������������������������� 195


Image Classification��������������������������������������������������������������������������������������������� 196
Music Classification���������������������������������������������������������������������������������������������� 196
E-mail Spam Filtering������������������������������������������������������������������������������������������� 196
Insurance�������������������������������������������������������������������������������������������������������������� 196


■Appendix A: Chart types and when to use them������������������������� 197
Pie chart���������������������������������������������������������������������������������������������� 197
Bar graph�������������������������������������������������������������������������������������������� 198
Histogram�������������������������������������������������������������������������������������������� 198
Stem and Leaf plot������������������������������������������������������������������������������ 199
Box plot����������������������������������������������������������������������������������������������� 199

Index���������������������������������������������������������������������������������������������� 201

x
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
About the Author

Danish Haroon currently leads the Data Sciences


team at Market IQ Inc, a patented predictive analytics
platform focused on providing actionable, real-time
intelligence, culled from sentiment inflection points.
He received his MBA from Karachi School for Business
and Leadership, having served corporate clients and
their data analytics requirements. Most recently, he
led the data commercialization team at PredictifyME,
a startup focused on providing predictive analytics for
demand planning and real estate markets in the US
market. His current research focuses on the amalgam of
data sciences for improved customer experiences (CX).

xi
About the Technical
Reviewer

Somil Asthana has a BTech from IITBHU India and


a MS from the University of New York at Buffalo (in
the United States) both in Computer Science. He is an
entrepreneur, machine learning wizard, and BigData
specialist consulting with fortune 500 companies like
Sprint, Verizon , HPE, and Avaya. He has a startup
which provides BigData solutions and Data Strategies
to Data Driven Industries in ecommerce, content/
media domain.

xiii
Acknowledgments

I would like to thank my parents and lovely wife for their continuous support throughout
this enlightening journey.

xv
Introduction

This volume embraces machine learning approaches and Python to enable automatic
rendering of rich insights and solutions to business problems. The book uses a
hands-on case study-based approach to crack real-world applications where machine
learning concepts can provide a best fit. These smarter machines will enable your
business processes to achieve efficiencies in minimal time and resources.
Python Machine Learning Case Studies walks you through a step-by-step approach to
improve business processes and help you discover the pivotal points that frame corporate
strategies. You will read about machine learning techniques that can provide support to
your products and services. The book also highlights the pros and cons of each of these
machine learning concepts to help you decide which one best suits your needs.
By taking a step-by-step approach to coding you will be able to understand the
rationale behind model selection within the machine learning process. The book is
equipped with practical examples and code snippets to ensure that you understand the
data science approach for solving real-world problems.
Python Machine Leaarning Case Studies acts as an enabler for people from both
technical and non-technical backgrounds to apply machine learning techniques to
real-world problems. Each chapter starts with a case study that has a well-defined
business problem. The chapters then proceed by incorporating storylines, and code
snippets to decide on the most optimal solution. Exercises are laid out throughout the
chapters to enable the hands-on practice of the concepts learned. Each chapter ends
with a highlight of real-world applications to which the concepts learned can be applied.
Following is a brief overview of the contents covered in each of the five chapters:
Chapter 1 covers the concepts of statistics and probability.
Chapter 2 talks about regression techniques and methods to fine-tune the model.
Chapter 3 exposes readers to time series models and covers the property of
stationary in detail.
Chapter 4 uses clustering as an aid to segment the data for marketing purposes.
Chapter 5 talks about classification models and evaluation metrics to gauge the
goodness of these models.

xvii
CHAPTER 1

Statistics and Probability

The purpose of this chapter is to instill in you the basic concepts of traditional statistics
and probability. Certainly many of you might be wondering what it has to do with
machine learning. Well, in order to apply a best fit model to your data, the most important
prerequisite is for you to understand the data in the first place. This will enable you to find
out distributions within data, measure the goodness of data, and run some basic tests
to understand if some form of relationship exists between dependant and independent
variables. Let’s dive in.

■■Note This book incorporates Python 2.7.11 as the de facto standard for coding
examples. Moreover, you are required to have it installed it for the Exercises as well.

So why do I prefer Python 2.7.11 over Python 3x? Following are some of the reasons:
• Third-party library support for Python 2x is relatively better than
support for Python 3x. This means that there are a considerable
number of libraries in Python 2x that lack support in Python 3x.
• Some current Linux distributions and macOS provide Python 2x
by default. The objective is to let readers, regardless of their OS
version, apply the code examples on their systems, and thus this
is the choice to go forward with.
• The above-mentioned facts are the reason why companies prefer
to work with Python 2x or why they decide not to migrate their
code base from Python 2x to Python 3x.

Case Study: Cycle Sharing


Scheme—Determining Brand Persona
Nancy and Eric were assigned with the huge task of determining the brand persona
for a new cycle share scheme. They had to present their results at this year’s annual
board meeting in order to lay out a strong marketing plan for reaching out to
potential customers.

© Danish Haroon 2017 1


D. Haroon, Python Machine Learning Case Studies, DOI 10.1007/978-1-4842-2823-4_1
Chapter 1 ■ Statistics and Probability

The cycle sharing scheme provides means for the people of the city to commute
using a convenient, cheap, and green transportation alternative. The service has 500
bikes at 50 stations across Seattle. Each of the stations has a dock locking system (where
all bikes are parked); kiosks (so customers can get a membership key or pay for a trip);
and a helmet rental service. A person can choose between purchasing a membership
key or short-term pass. A membership key entitles an annual membership, and the key
can be obtained from a kiosk. Advantages for members include quick retrieval of bikes
and unlimited 45-minute rentals. Short-term passes offer access to bikes for a 24-hour
or 3-day time interval. Riders can avail and return the bikes at any of the 50 stations
citywide.
Jason started this service in May 2014 and since then had been focusing on
increasing the number of bikes as well as docking stations in order to increase
convenience and accessibility for his customers. Despite this expansion, customer
retention remained an issue. As Jason recalled, “We had planned to put in the investment
for a year to lay out the infrastructure necessary for the customers to start using it. We
had a strategy to make sure that the retention levels remain high to make this model self-
sustainable. However, it worked otherwise (i.e., the customer base didn’t catch up with
the rate of the infrastructure expansion).”
A private service would have had three alternatives to curb this problem: get
sponsors on board, increase service charges, or expand the pool of customers. Price hikes
were not an option for Jason as this was a publicly sponsored initiative with the goal of
providing affordable transportation to all. As for increasing the customer base, they had
to decide upon a marketing channel that guarantees broad reach on low cost incurred.
Nancy, a marketer who had worked in the corporate sector for ten years, and Eric, a
data analyst, were explicitly hired to find a way to make things work around this problem.
The advantage on their side was that they were provided with the dataset of transaction
history and thus they didn’t had to go through the hassle of conducting marketing
research to gather data.
Nancy realized that attracting recurring customers on a minimal budget
required understanding the customers in the first place (i.e., persona). As she stated,
“Understanding the persona of your brand is essential, as it helps you reach a targeted
audience which is likely to convert at a higher probability. Moreover, this also helps in
reaching out to sponsors who target a similar persona. This two-fold approach can make
our bottom line positive.”
As Nancy and Eric contemplated the problem at hand, they had questions like the
following: Which attribute correlates the best with trip duration and number of trips?
Which age generation adapts the most to our service?
Following is the data dictionary of the Trips dataset that was provided to Nancy and
Eric:

2
Chapter 1 ■ Statistics and Probability

Table 1-1. Data Dictionary for the Trips Data from Cycles Share Dataset

Feature name Description


trip_id Unique ID assigned to each trip
Starttime Day and time when the trip started, in PST
Stoptime Day and time when the trip ended, in PST
Bikeid ID attached to each bike
Tripduration Time of trip in seconds
from_station_name Name of station where the trip originated
to_station_name Name of station where the trip terminated
from_station_id ID of station where trip originated
to_station_id ID of station where trip terminated
Usertype Value can include either of the following: short-term pass
holder or member
Gender Gender of the rider
Birthyear Birth year of the rider

Exercises for this chapter required Eric to install the packages shown in Listing 1-1.
He preferred to import all of them upfront to avoid bottlenecks while implementing the
code snippets on your local machine.
However, for Eric to import these packages in his code, he needed to install them in
the first place. He did so as follows:
1. Opened terminal/shell
2. Navigated to his code directory using terminal/shell
3. Installed pip:

python get-pip.py

4. Installed each package separately, for example:

pip install pandas

Listing 1-1. Importing Packages Required for This Chapter


%matplotlib inline

import random
import datetime
import pandas as pd
import matplotlib.pyplot as plt
import statistics

3
Chapter 1 ■ Statistics and Probability

import numpy as np
import scipy
from scipy import stats
import seaborn

Performing Exploratory Data Analysis


Eric recalled to have explained Exploratory Data Analysis in the following words:

What do I mean by exploratory data analysis (EDA)? Well, by this I


mean to see the data visually. Why do we need to see the data visually?
Well, considering that you have 1 million observations in your dataset
then it won’t be easy for you to understand the data just by looking at it,
so it would be better to plot it visually. But don’t you think it’s a waste of
time? No not at all, because understanding the data lets us understand
the importance of features and their limitations.

Feature Exploration
Eric started off by loading the data into memory (see Listing 1-2).

Listing 1-2. Reading the Data into Memory


data = pd.read_csv('examples/trip.csv')

Nancy was curious to know how big the data was and what it looked like. Hence, Eric
wrote the code in Listing 1-3 to print some initial observations of the dataset to get a feel
of what it contains.

Listing 1-3. Printing Size of the Dataset and Printing First Few Rows
print len(data)
data.head()

Output

236065

4
Chapter 1 ■ Statistics and Probability

Table 1-2. Print of Observations in the First Seven Columns of Dataset

trip_id starttime stoptime bikeid tripduration from_station_name to_station_name

Occidental Park/
10/13/2014 10/13/2014
431 SEA00298 985.935 2nd Ave & Spring St Occidental Ave S
10:31 10:48
& S Washing...

Occidental Park/
10/13/2014 10/13/2014
432 SEA00195 926.375 2nd Ave & Spring St Occidental Ave S
10:32 10:48
& S Washing...

Occidental Park/
10/13/2014 10/13/2014
433 SEA00486 883.831 2nd Ave & Spring St Occidental Ave S
10:33 10:48
& S Washing...

Occidental Park/
10/13/2014 10/13/2014
434 SEA00333 865.937 2nd Ave & Spring St Occidental Ave S
10:34 10:48
& S Washing...

Occidental Park/
10/13/2014 10/13/2014
435 SEA00202 923.923 2nd Ave & Spring St Occidental Ave S
10:34 10:49
& S Washing...

Table 1-3. Print of Observations in the Last five Columns of Dataset

from_station_id to_station_id usertype gender birthyear

CBD-06 PS-04 Member Male 1960.0

CBD-06 PS-04 Member Male 1970.0

CBD-06 PS-04 Member Female 1988.0

CBD-06 PS-04 Member Female 1977.0

CBD-06 PS-04 Member Male 1971.0

5
Chapter 1 ■ Statistics and Probability

After looking at Table 1-2 and Table 1-3 Nancy noticed that tripduration is
represented in seconds. Moreover, the unique identifiers for bike, from_station, and
to_station are in the form of strings, contrary to those for trip identifier which are in
the form of integers.

Types of variables
Nancy decided to go an extra mile and allocated data type to each feature in the dataset.

Table 1-4. Nancy’s Approach to Classifying Variables into Data Types

Feature name Variable type


trip_id Numbers
bikeid
tripduration
from_station_id
to_station_id
birthyear
Starttime Date
Stoptime
from_station_name to_station_name Text
Usertype
Gender

After looking at the feature classification in Table 1-4 Eric noticed that Nancy had
correctly identified the data types and thus it seemed to be an easy job for him to explain
what variable types mean. As Eric recalled to have explained the following:

In normal everyday interaction with data we usually represent numbers


as integers, text as strings, True/False as Boolean, etc. These are what
we refer to as data types. But the lingo in machine learning is a bit more
granular, as it splits the data types we knew earlier into variable types.
Understanding these variable types is crucial in deciding upon the type
of charts while doing exploratory data analysis or while deciding upon a
suitable machine learning algorithm to be applied on our data.

Continuous/Quantitative Variables
A continuous variable can have an infinite number of values within a given range. Unlike
discrete variables, they are not countable. Before exploring the types of continuous
variables, let’s understand what is meant by a true zero point.

6
Visit https://textbookfull.com
now to explore a rich
collection of eBooks, textbook
and enjoy exciting offers!
Chapter 1 ■ Statistics and Probability

True Zero Point


If a level of measurement has a true zero point, then a value of 0 means you have nothing.
Take, for example, a ratio variable which represents the number of cupcakes bought. A
value of 0 will signify that you didn’t buy even a single cupcake. The true zero point is a
strong discriminator between interval and ratio variables.
Let’s now explore the different types of continuous variables.

Interval Variables
Interval variables exist around data which is continuous in nature and has a numerical
value. Take, for example, the temperature of a neighborhood measured on a daily basis.
Difference between intervals remains constant, such that the difference between 70
Celsius and 50 Celsius is the same as the difference between 80 Celsius and 100 Celsius.
We can compute the mean and median of interval variables however they don’t have a
true zero point.

Ratio Variables
Properties of interval variables are very similar to those of ratio variables with the
difference that in ratio variables a 0 indicates the absence of that measurement. Take,
for example, distance covered by cars from a certain neighborhood. Temperature in
Celsius is an interval variable, so having a value of 0 Celsius does not mean absence of
temperature. However, notice that a value of 0 KM will depict no distance covered by the
car and thus is considered as a ratio variable. Moreover, as evident from the name, ratios
of measurements can be used as well such that a distance covered of 50 KM is twice the
distance of 25 KM covered by a car.

Discrete Variables
A discrete variable will have finite set of values within a given range. Unlike continuous
variables those are countable. Let’s look at some examples of discrete variables which are
categorical in nature.

Ordinal Variables
Ordinal variables have values that are in an order from lowest to highest or vice versa.
These levels within ordinal variables can have unequal spacing between them. Take, for
example, the following levels:
1. Primary school
2. High school
3. College
4. University

7
Chapter 1 ■ Statistics and Probability

The difference between primary school and high school in years is definitely not
equal to the difference between high school and college. If these differences were
constant, then this variable would have also qualified as an interval variable.

Nominal Variables
Nominal variables are categorical variables with no intrinsic order; however, constant
differences between the levels exist. Examples of nominal variables can be gender, month
of the year, cars released by a manufacturer, and so on. In the case of month of year, each
month is a different level.

Dichotomous Variables
Dichotomous variables are nominal variables which have only two categories or levels.
Examples include
• Age: under 24 years, above 24 years
• Gender: male, female

Lurking Variable
A lurking variable is not among exploratory (i.e., independent) or response
(i.e., dependent) variables and yet may influence the interpretations of relationship
among these variables. For example, if we want to predict whether or not an applicant
will get admission in a college on the basis of his/her gender. A possible lurking variable
in this case can be the name of the department the applicant is seeking admission to.

Demographic Variable
Demography (from the Greek word meaning “description of people”) is the study of
human populations. The discipline examines size and composition of populations as well
as the movement of people from locale to locale. Demographers also analyze the effects
of population growth and its control. A demographic variable is a variable that is collected
by researchers to describe the nature and distribution of the sample used with inferential
statistics. Within applied statistics and research, these are variables such as age, gender,
ethnicity, socioeconomic measures, and group membership.

Dependent and Independent Variables


An independent variable is also referred to as an exploratory variable because it is being
used to explain or predict the dependent variable, also referred to as a response variable
or outcome variable.
Taking the dataset into consideration, what are the dependent and independent
variables? Let’s say that Cycle Share System’s management approaches you and asks
you to build a system for them to predict the trip duration beforehand so that the supply

8
Chapter 1 ■ Statistics and Probability

of cycles can be ensured. In that case, what is your dependent variable? Definitely
tripduration. And what are the independent variables? Well, these variables will comprise
of the features which we believe influence the dependent variable (e.g., usertype, gender,
and time and date of the day).
Eric asked Nancy to classify the features in the variable types he had just explained.

Table 1-5. Nancy’s Approach to Classifying Variables into Variable Types

Feature name Variable type


trip_id Continuous
bikeid
tripduration
from_station_id
to_station_id
birthyear
Starttime DateTime
Stoptime
from_station_name String
to_station_name
Usertype gender Nominal

Nancy now had a clear idea of the variable types within machine learning, and also
which of the features qualify for which of those variable types (see Table 1-5). However
despite of looking at the initial observations of each of these features (see Table 1-2) she
couldn’t deduce the depth and breadth of information that each of those tables contains.
She mentioned this to Eric, and Eric, being a data analytics guru, had an answer: perform
univariate analysis on features within the dataset.

Univariate Analysis
Univariate comes from the word “uni” meaning one. This is the analysis performed on a
single variable and thus does not account for any sort of relationship among exploratory
variables.
Eric decided to perform univariate analysis on the dataset to better understand the
features in isolation (see Listing 1-4).

Listing 1-4. Determining the Time Range of the Dataset


data = data.sort_values(by='starttime')
data.reset_index()
print 'Date range of dataset: %s - %s'%(data.ix[1, 'starttime'],
data.ix[len(data)-1, 'stoptime'])

Output

Date range of dataset: 10/13/2014 10:32 - 9/1/2016 0:20

9
Chapter 1 ■ Statistics and Probability

Eric knew that Nancy would have a hard time understanding the code so he decided
to explain the ones that he felt were complex in nature. In regard to the code in Listing
1-4, Eric explained the following:

We started off by sorting the data frame by starttime. Do note that


data frame is a data structure in Python in which we initially loaded
the data in Listing 1-2. Data frame helps arrange the data in a tabular
form and enables quick searching by means of hash values. Moreover,
data frame comes up with handy functions that make lives easier when
doing analysis on data. So what sorting did was to change the position
of records within the data frame, and hence the change in positions
disturbed the arrangement of the indexes which were earlier in an
ascending order. Hence, considering this, we decided to reset the indexes
so that the ordered data frame now has indexes in an ascending order.
Finally, we printed the date range that started from the first value of
starttime and ended with the last value of stoptime.

Eric’s analysis presented two insights. One is that the data ranges from October 2014
up till September 2016 (i.e., three years of data). Moreover, it seems like the cycle sharing
service is usually operational beyond the standard 9 to 5 business hours.
Nancy believed that short-term pass holders would avail more trips than their
counterparts. She believed that most people would use the service on a daily basis rather
than purchasing the long term membership. Eric thought otherwise; he believed that
new users would be short-term pass holders however once they try out the service and
become satisfied would ultimately avail the membership to receive the perks and benefits
offered. He also believed that people tend to give more weight to services they have paid
for, and they make sure to get the maximum out of each buck spent. Thus, Eric decided
to plot a bar graph of trip frequencies by user type to validate his viewpoint (see Listing 1-5).
But before doing so he made a brief document of the commonly used charts and
situations for which they are a best fit to (see Appendix A for a copy). This chart gave
Nancy his perspective for choosing a bar graph for the current situation.

Listing 1-5. Plotting the Distribution of User Types


groupby_user = data.groupby('usertype').size()
groupby_user.plot.bar(title = 'Distribution of user types')

10
Chapter 1 ■ Statistics and Probability

Distribution of user types


160000

140000

120000

100000

80000

60000

40000

20000

Short-Term Pass Holder


Member

usertype

Figure 1-1. Bar graph signifying the distribution of user types

Nancy didn’t understand the code snippet in Listing 1-5. She was confused by the
functionality of groupby and size methods. She recalled asking Eric the following: “I can
understand that groupby groups the data by a given field, that is, usertype, in the current
situation. But what do we mean by size? Is it the same as count, that is, counts trips falling
within each of the grouped usertypes?”
Eric was surprised by Nancy’s deductions and he deemed them to be correct.
However, the bar graph presented insights (see Figure 1-1) in favor of Eric’s view as the
members tend to avail more trips than their counterparts.
Nancy had recently read an article that talked about the gender gap among
people who prefer riding bicycles. The article mentioned a cycle sharing scheme in UK
where 77% of the people who availed the service were men. She wasn’t sure if similar
phenomenon exists for people using the service in United States. Hence Eric came up
with the code snippet in Listing 1-6 to answer the question at hand.

Listing 1-6. Plotting the Distribution of Gender


groupby_gender = data.groupby('gender').size()
groupby_gender.plot.bar(title = 'Distribution of genders')

11
Random documents with unrelated
content Scribd suggests to you:
VIIDESTOISTA LUKU.

Pimeiden iltojen aika on käsissä.

Vilja valmistuu pelloilla. Ruiskuhilas on jo ehtinyt riiheenkin ja


suvitouot odottavat sirppiä.

Maamies myhäilee tyytyväisenä omaa, hiljaista myhäilyään, jonka


sävyn outokin huomaa hänen silmiensä kirkkaasta hohteesta.

Tänä vuonna tulee tavallista parempi sato. Ruis näyttää antavan


yli odotusten. Suvivilja on rehevää ja suurijyväistä, ja peruna
pudistaa niin, ettei tahdo mahtua penkkeihinsä.

Tyytyväisinä istutaan Aholassa pimenevinä syysiltoina avotakan


hiipuvan hiilloksen ääressä. Näperrellään mitähän näperrellään, ja
sana silloin toinen tällöin naapurille heitetään. Muualla tässäkin
pitäjässä on jo aikoja sitten avotakka rautahellaan vaihdettu, mutta
Aholan isäntä ei ole vielä tätä esi-isien rakasta uunilaitetta
nykyaikaiseksi muuttanut. Ja on siellä Aholassa vielä toinenkin isiltä
peritty tapa käytännössä, puhdetöiden teko. Nyt ei tosin ole vielä
puhdetöiden aika käsissä, eikä takkaan ole tehty tulta myöskään
lämmittämistä varten. Illalliskeittotulien jätteet siinä nyt hiljalleen
hiipuvat. Tuli olisi jo sammunutkin, ellei isäntä olisi siihen aterian
aikana paria tervaskannonpuolikasta lisäksi heittänyt paremmin
niinkuin näkemistä silmälläpitäen. Lamputkin kun ovat vielä
kesäkunnossa, ja nykyaikaisia sähkövaloja ei Aholaan ole vielä
laitettu.

— Ehtiihän ne sitten hankkia, jos lamppupeli pettää, on isäntä


sanonut. Ja kun lamppupeli ei ole pettänyt, niin sähkövalot on jäänyt
hankkimatta.

Vankka ja maittava illallisateria on nyt syöty ja tyytyväisin, kylläisin


mielin miehet istuvat hiipuvan takkatulen ääressä. Laiskasti kulkee
tarina. Hämärä peittää jo avaran tuvan, ja vain vaivoin näkee
naisväki korjata ruuanjätteet pöydältä ja pestä astiat. Miesten
liikahdellessa heijastuu raukea valo väliin pöydällekin ja varjot seinillä
liikkuvat. Silloin naiset kiihdyttävät hetkeksi työtään, mutta pian taas
pimeys palaa entiselleen pahoittaen astianpesijät varovaisuuteen.
Naisväki supattaa keskenään omia pieniä asioitaan. He eivät tahdo
häiritä tuvan torkkuvaa hiljaisuutta eikä miesten rauhaa, kun nämä
siinä käsiinsä nojaten, silloin tällöin kylläisinä röyhähdellen, melkein
äänettöminä päiväntapahtumia mietiskellen, istuvat.

Takan hehku sammuu vähitellen. Naisväki on lopettanut työnsä ja


istujista yksi toisensa jälkeen siirtyy päivän ponnistuksista
lepäämään.

Isäntä ja Teemu jäävät viimeisiksi.

Teemun mieltä riipaisee niin omituisesti. Sitä aivan hytkäyttää kuin


ensi kertaa ripillä käydessä ja sydän takoo, että melkein kuulee sen
äänen, ja veret kohoavat kalpealle poskelle. Kohotkoot, ajattelee
Teemu. Eipä sitä tässä hämärässä kukaan näe.
— Nyt minä kysyn, hän päättävästi ajattelee. Tehköön isäntä sitten
mitä haluaa.

Mutta vaikka ajatus olikin kypsynyt jo päätökseksi, niin mitenkään


sitä ei tahtonut saada sanotuksi.

Se asia oli jo koko kesän pitänyt Teemun mieltä pienessä


jännityksessä. Ensin se oli kuin sivumennen iskenyt, eräänä lauantai-
iltana, jolloin hän palasi kytöojalta Terva-ahon poikki. Illalla hän ei
sitä sen enempää ajatellut. Saunassa se tosin kuin salaa hiipi
uudelleen mieleen, mutta maatapannessa hän ei sitä muistanut enää
ollenkaan. Eikä se aamulla herätessäkään vaivannut mieltä. Mutta
maanantaina siinä kytömaalle vievän tien haarassa se taas yhtäkkiä
töksähti mieleen. Se tuli kuin pilvistä pudonneena, ja veti kuin vetikin
astelemaan Terva-ahon kautta, vaikka toista tietä olisi ollut lyhyempi
matka.

— Hullutustahan se kaikki on, hän ajatteli. Milläpäs minä, ikäloppu


mies sellaiseen…

Mutta vaikka hän miten koetti sitä ajatusta mielestään eksyttää,


niin aina se vain sieltä piilosta sukelsi esille ja vaati huomiota
itselleen. Toisinaan se piti päiväkausia pienessä jännityksessä eikä
tahtonut antaa iltasin unta. Väliin se hiukan hellitti, mutta pian taas
entistä voimakkaampana tuli esille.

Se oli merkillinen ajatus! Se oli yhtä hullu haave kuin opettajan


sanojen mukaan sekin, että maat otetaan rikkailta pois ja annetaan
köyhille. Niinpä niin. Hullu haave. Se on viisas mies, opettaja, kun se
osaa sanoa niin mukavasti, että hullu haave. Mutta mitäpäs ne
lukeneet eivät osaisi. Hullu haave se on se hänenkin ajatuksensa, ei
siitä koskaan tule mitään. Kumma vain, että se istuu niin lujassa
tuolla päänupissa.

Tästä merkillisestä ajatuksesta erille päästäkseen Teemu iski


työhön kaikkine vanhan miehen voimineen. Ja oli aikoja, kun hän
selkä märkänä oikein kaivoi ja väänsi, ettei hän väsyneenä muistanut
sitä hullua haavettaan, ei sittenkään, vaikka hän aivan vaistomaisesti
joka aamu ja ilta kulki Terva-ahon kautta työmaalle ja työmaalta
kotiin.

Mutta nyt syyspuolella, kun päivät lyhenivät ja illat pitenivät, se


ajatus ei jättänyt häntä hetkeksikään rauhaan.

— Jos voisi edes Eevalle siitä puhua, hän ajatteli, niin ehkäpä se
hellittäisi. Mutta ei se Eeva sellaista ymmärrä. Pilkaksi löisi koko
ajatuksen ja nauraisi. Voisi vielä sanoa hulluksi. Parasta on pitää
kaikki vain omana salaisuutenaan.

Mutta kyllä siinä oli pitämistä. Toisenkin kerran se pyrki huulilta


Eevan korvaan ja vain kovasti pidellen pysyi sisällä. Olihan hän
sentään vielä mies, vaikka vanhakin, että tiesi mitä teki ja puhui. Ja
tätä asiata ei sanota kellekään, ei edes isännälle, joka sen paraiten
ymmärtäisi, ja jolle sanottuna siitä saisi joko luopua tai ryhtyä sitä
toteuttamaan. Toteuttamaanko? Ei, ei! Se olisi liian suuri onni ja ilo
hänelle, omasta mökistä ulos ajetulle…

Koko kesän aina tähän iltaan asti Teemu oli voinut salaisuutensa
säilyttää. Mutta nyt sen pidättäminen tuntui ylivoimaiselta tehtävältä.
Aivan siinä hiki nousi otsalle.

Kun autio tupa hämärtymistään hämärtyi ja raukea hiljaisuus


vallitsi, ympärillä, rohkaisi hän viimein itsensä ja suuren
salaisuutensa paljastaakseen jo kerran rykäsi. Mutta sanat juuttuivat
kurkkuun ja tupa tuli yhtäkkiä säkkipimeäksi. Sydän jyskytti
haljetakseen ja koko ruumis vapisi jännityksestä.

Isäntä liikahti noustakseen.

Nyt tuli Teemulle hätä käteen.

— Tuota… tuota… hän tapaili yskien… Muistaahan isäntä… hm…


sen Terva-ahon?

Mitäs se Teemu nyt? ajatteli isäntä. Tottahan hän sen pienen


ahopahasen muisti. Menneinä vuosina siinä oli ollut halme, mutta nyt
se jo oli suurimmaksi osaksi metsittynyt. Lamminpuoleinen syrjä oli
enää autiona.

— Kyllähän minä sen muistan. Kuinka niin? hän kysyi.

— Muuten vain.

Seurasi pitkä äänettömyys, ennen kuin Teemu jatkoi:

— Minä tässä vähän olen itsekseni… hm… tuota… ajatellut, mutta


taitaa olla mieletöntä, että eiköhän isäntä… tuota… tuota… antaisi
siitä minulle pientä mökin paikkaa…

Tämän sanottuaan Teemu tunsi painuvansa kuin maan alle.


Pitkään aikaan hän ei kuullut ei nähnyt mitään. Mitähän hän oli
isännälle sanonut? Ei suinkaan hän ollut vain päättömiä puhunut?

— Vieläkö uskaltaisit yrittää? kysyi isäntä. Samalla hän ajatteli,


että paras olisi, kun luopuisit siitä puuhasta. Helpompi sinun olisi
tässä viimeiset vuotesi elellä.
— Kyllä, vastasi Teemu aivan kuin asia olisi jo ratkaistu, ja lisäsi:

— Oikeitten ihmisten kanssa.

Isännän teki mieli aluksi vastustaa, mutta nähdessään Teemun


innon hän sanoi:

— Kyllä se minun puolestani passaa. Koska sinä aiot aloittaa?


Oletko jo sitä ajatellut?

— Nyt heti vähitellen olen meinannut.

— No, kyllä se passaa, passaa varsin ihmeesti. Mutta tehdään


ensin kirjallinen kauppa ja eroitetaan maa niinkuin lait ja asetukset
vaativat. Minun eläessäni voisit kyllä muutenkin rakentaa ja asua,
mutta jos minusta aika jättää, niin sinun on turvallisempi olla, kun
lailliset paperit ovat taskussasi.

— Paljon kiitoksia! Kyllä minä isäntään uskon muutenkin, mutta


tehdään vain niin kuin isäntä tahtoo ja hyvä on.

— Mennään sitten huomenna heti aamustapäivin sitä paikkaa


katsomaan, että voit aloittaa työt milloin haluat.

— Miten vain isännälle paraiten passaa!

Teemu nukkui sinä yönä hyvin rauhattomasti. Heti päivän valjettua


hän toisten vielä makeimmillaan maatessa nousi ylös ja lähti kiireesti
astua köppäsemään Terva-ahoa kohti.

Hänelle oli alkanut uusi elämä.


KUUDESTOISTA LUKU.

Talven ensi lumi on peittänyt maan.

Tuulet ja syysmyrskyt ovat tauonneet ja ilma on seestynyt


pakkasta antavaksi.

Terva-ahon koilliskulmalla, lammen rannalla, on kaivettu maata,


puita kaadettu ja veistetty, kiviä ja kantoja väännelty ja
rotkopaikkoja tasoiteltu. Pieni ala peltoakin on jo valmiiksi kuokittu.

Mutta nyt ovat työt keskeytyneet, eikä viikkokauteen siellä ole


rakentajaa näkynyt. Valkoinen lumi, talven ensi lumi, on kattanut
tasaisesti Syrjälän Teemun työmaan ja kuokoksella olevan pienen
peltotilkun peittänyt. Rakentaja ja kuokkija itse makaa
kuolemansairaana Aholan talon porstuan peräkamarissa, ja
epätietoista on, tuleeko hänestä enää kesken jääneen työnsä
jatkajaa.

Kuume on noussut peloittavan korkealle, ja raskaasti, läähättäen


kohoaa heikko rinta. Tällaista menoa on jo jatkunut pian viikon
päivät. Tiheästi toistuvat pistokset rinnan vasemmalla puolella ovat
lisänneet sairaalle kipua. Väliin on sairas ollut vähän parempi, mutta
viime yönä, kuudentena vuorokautena sairauden alusta lukien, oli
ottanut niin kovasti, että koko Aholan talon väki oli noussut Teemun
loppua katsomaan. Kuolema hellitti kuitenkin vielä otteensa, mutta
tiedottomassa tilassa sairas nyt hourailee. Isäntä on panettanut
hevosen valjaisiin ja käskenyt renkipojan lähteä kiireesti hakemaan
kirkolta lääkäriä. Saa nähdä, ehtiikö lääkäri ajoissa, vai jättääkö
elämä vanhan Teemun ennen lääkärin tuloa. Sairaan tila on kovin
huolestuttava ja panee pahinta pelkäämään.

Eeva on yön päivän kanssa istunut sairaan miehensä vieressä.


Lukemattomat kerrat on kyynel vanhan vaimon silmäkulman
kostuttanut, mutta silloin, milloin vesi ei ole silmistä valunut, silloin
Eeva on vapisevalla, katkonaisella äänellä lukenut ikuista sanaa
sairaalle miehelleen, joka kuumehoureissaan ei siitä kuitenkaan
mitään tiedä. Väliin hän on lasimaisen elottomat silmänsä avannut ja
silloin lukija on tarttunut aina sairaan käteen ja kysynyt:

— Kuuletko sinä, mitä Jumala sanoo?

Sairas on vaistomaisesti räpäyttänyt silmäänsä kerran pari. Sen


Eeva on tulkinnut merkitsevän sitä, että kyllä se kuulee ja ääntään
korottaen hän on taas jatkanut keskeytynyttä lukuaan siksi kunnes
poostamet ovat ruvenneet silmissä hyppimään, jolloin hänen on
täytynyt hellittää.

Elleivät aholaiset olisi parhaansa mukaan sairasta hoitaneet, niin


kyllä hän olisi jo tämän maailman jättänyt. Eihän vanha vaimo olisi
mitenkään jaksanut yksinään viikkokautta valvoa, eikä kaikistellen
ymmärtänyt, miten sairaan tuskia olisi pitänyt lieventää. Mutta
aholaiset auttoivat. Vuoroin isäntä, emäntä, tytär ja palvelijat kävivät
sairasta katsomassa ja toivat tullessaan lääkkeitä ja käydessään
kääreitä muuttivat, että tauti olisi helpottanut. Mutta mikään ei
näyttänyt auttavan. Toisinaan tuntui siltä, kun tauti saisi paremman
käänteen, mutta tovin kuluttua se taas kouristi entistä kovemmin ja
kuume nousi.

Houraillessaan sairas puhui Risumäen isännästä, vallesmannista,


poliiseista, Syrjälästä ja Terva-ahosta sekaisin. Kukaan ei hänen
puheestaan saanut selvää. Eikäpä siinä mitään järkeä ollut, sairaan
hourailussa.

— Terva-aholta ei ajeta pois, hän houraili. Siellä on suuri tupa…


kaunis muuri… vallesmanni… ja valkoinen lattia… Risumäen isäntä…
Neulanen nauraa… Ei se satu minuun… poliisit tulevat… kirkonkellot
soivat… voi, voi miten ne soivat… Nyt mennään Terva-aholle…
vaunuilla ajetaan… kellot… poliisit… kieltäkää.» Ne särkevät oven…
Terva-ahon oven…

— Mitä se puhuu? kysyi Aholan isäntä, joka sairaan viimeisten


sanojen aikana tuli sisälle.

— Terva-ahosta se jotakin höpisee, mitä höpissee, ja poliiseista ja


kirkonkelloista.

— Taitaa olla se Terva-aho rakas paikka Teemulle, sanoi Aholan


isäntä tovin kuluttua ääni väristen.

Kyllä se oli. Oikein isäntä, tarkkasilmäinen mies, sen arvasi. Terva-


ahosta Teemu oli viime, aikoina vaimolleen yhtenään puhunut ja
kuvitellut, että sellaiseen ja sellaiseen kuntoon se laitetaan, kun
sinne päästään. Siellä eletään ja ollaan kuin karhut pesässään. Siitä
tuleekin muhkeampi paikka kuin Syrjälästä, eikä tartte pelätä, että
tullaan poisajamaan.
Kovasti Teemu olikin jo Terva-ahon kupeella uurastanut. Neljä
päivää viikossa hän oli tehnyt talon töitä, että leivissä pysyi, ja
kahtena päivänä vääntänyt, kaivanut ja kuokkinut Terva-aholla kuin
aikoinaan Syrjälää rakentaessaan. Kukaan ei häntä voinut estää
mielityöhön menemästä. Rankkojen syyssateiden aikoinakin hän
siellä — aamusta iltaan läpimärkänä työskenteli, ja niiltä ajoilta
ankara tautikin lienee peräisin. Kuumeisella kiireellä hän koetti uutta
pesäänsä rakentaa ja saada se valmiiksi niin, että siihen voisi jo ensi
kesänä muuttaa.

Kyllähän hänellä ja Eevalla oli kovin hyvä olla ja asua Aholan


porstuanperäkamarissa. Vuokra oli varsin mitätön, sama kuin ei
mitään. Kolme markkaa ei ennenkään mikään suuri summa ollut, ja
nyt se ei ollut kahdenkymmenenviiden penninkään arvoinen. Oli
Teemu tarjonnut isännälle heti alussa viittäkymmentä markkaa
kuukaudelta, mutta isäntä oli sanonut, että hassuko sinä olet.
Puheitten ja sopimusten mukaan tässä talossa on eletty ennen ja
aiotaan elää vastakin. Pane sinä vain pennisi parempiin tarpeisiin.

Mukavaa oli Aholan muu väkikin, etenkin emäntä. Maidosta,


voista, jauhoista, ryyneistä ja muista elintarpeista, mitä talossa oli,
hän ei koskaan ottanut viimeistä hintaa. Ja aina sai mitä halusi.
Pyytäjän ei tarvinnut milloinkaan Aholasta tyhjin käsin lähteä eikä
kulkijan ovelta yönselkään kääntyä. Ihmeellinen siunaus oli
aholaisilla. Jos heidän hyvyytensä ja anteliaisuutensa näytti
ehtymättömältä, niin ei heillä myöskään leivästä eikä
leivänsärpimestä näyttänyt olevan puutetta. Kaikkea riitti yllin kyllin.

Monet monituiset kerrat Aholan emäntä pisti Eevan käteen milloin


lämpimäisleivän, milloin maito- tai piimälitran, milloin lihakimpaleen,
ryynikilon ja milloin mitäkin. Eikä hän koskaan antimillaan
rehennellyt. Ikäänkuin sivumennen, huomaamatta, ja muita asioita
puhellen hän antavan kätensä ojensi. Hän tunsi sisimmässään
antamisen ilon. Ja se oli hänelle kyllin suuri kiitos ja palkkio.

Kelpasi sitä vanhusten tällaisessa talossa asua. Mutta vaikka heillä


oli miten hyvä olla, niin yhtä heiltä kuitenkin puuttui, varsinkin
Teemulta. Hän kaipasi jotakin. Ja tämä kaipaus oli niin voimakas,
että sitä oli mahdoton vastustaa. Painajaisen tavoin se vaivasi
yökaudet ja yhtenään päivilläkin pihisti. Eikä se antanut ennemmin
rauhaa, ennenkuin hän pääsi Tervalammen rannalle mielitekoaan
toteuttamaan.

Siellä rauhaisan ahon laidassa, mustavetisen sydänmaan lammen


rannalla, kaukana muun maailman melskeestä hän tunsi olevansa
kuin kuningas omassa valtakunnassaan. Sinne ei maailman
maantiemelu kantautunut, eikä siellä pahojen ihmisten pistopuheet
mieltä pahoittaneet. Siellä sai vapaasti hengittää ja tehdä mitä
halusi. Siellä tuntui olo ja elämä niin ihmeellisen rauhalliselta ja
viihtyiseltä. Kun sinne vain pääsi, niin heti oli vapaampi hengittää.
Väliin teki mieli koko maailmaa syleillä ja antaa kaikille anteeksi
pahat puheet ja väärinteot, ja monta kertaa Teemu syliään
levittelikin, kangistuneita vanhan miehen syliään, ja innostuksensa
huomatessaan kuin häveten, laski hymähtäen kätensä alas.

Unohtaa ja antaa anteeksi. Niin, kyllä hän tällaisina herkkinä


hetkinään olisi ollut valmis unohtamaan kaikki kärsimänsä vääryydet,
jos vain vastapuolelta olisi annettu pieninkin sysäys sovinnolliseen
suuntaan. Ja ilman tätä sysäystäkin hän oli valmis unohtamaan. Ei
hän oikeastaan enää kenellekään kantanut kaunaa. Hän oli itsekseen
ajatellen ja mietiskellen tullut siihen tulokseen, että ehkäpä se kaikki
on ollut näin menevä. Ehkäpä hän on ollut juuri sellaisen kurituksen
tarpeessa, että elämän paremmin ymmärtäisi.

Tämä kohtaloonsa alistumisen ja syvä sovinnon henki oli hänessä


vain vahvistunut ja ikäänkuin lujittunut sen jälkeen, kun hän oli
kuullut, etteivät Risumäen isännänkään asiat ole enää oikealla
tolalla. Kai sillä isännälläkin on jotakin tunnolla, kun se niin
armottomasti on sitä juontiaan jatkanut. Näkyjäkin, juopon näkyjä,
kuuluu jo nähneen ja pyssyjen kanssa räiskäneen, että koko talo on
ollut sekaisin. Ei sitä järkevä ihminen sellaiseen peliin rupea, elleivät
asiat ole ihan hullusti.

Ja aina voimakkaammaksi tämä sovittava ääni Teemun povessa


paisui, kun huhu tiesi kertoa kummia asioita kirkoltakin.
Vallesmannin luona on pidetty tutkintoja ja suurista kavalluksista
puhutaan. Opettaja on sanonut, sen Teemu on omin korvin kuullut,
että vallesmannilta tulee pian lähtö tiilenpäitä lukemaan. Eivät kuulu
olevan asiat sellaisessa oorningissa, kun suuret herrat tahtovat. Ja
tilikirjojen numerotkaan eivät kuulu tyydyttävän tarkastajia.
Ihmeelliseltä se vähän tuntuu, mutta kyllä kai opettaja, oppinut ja
lukenut mies, ne asiat tietää. Mitenkähän se vallesmanni on sotkenut
ne kirjansa sillä tavalla? Onhan se sellainen liukas ja ovela mies, että
kyllä sen luulisi herrojen kanssa pärjäävän. Niinhän se siellä
käräjilläkin silloin syksyllä puhui ja huhtoi, että oikein sitä tuomarikin
taisi ihmetellä. Ja niin kävi minulle kuin vallesmanni sanoi. Ei sitä
moni kohelo olisi osannut niin paikalleen arvata. Mutta vaikka minut
alas paukautettiinkin, niin minulla on jalkojeni alla vielä pohja, miltä
ponnistan. Mutta mistähän vallesmanniparka ponnistaa, jos nyt virka
joutuu naulaan?
Tähän tapaan ne Teemun ajatukset risteilivät siellä
yksinäisyydessä, ja kappale kappaleen jälkeen kuivaa ahon syrjää
antautui hänen iskuilleen. Eihän se vanhan miehen työnteko mitään
riuskaa ollut, mutta ahkeruus ja päivän pituus korvasivat kaiken sen,
mitä ruumiillisesta kunnosta puuttui.

Ei Teemu Neulastakaan siellä yksinäisinä hetkinään pahoin mielin


muistellut. Neulasella on sellainen kierä luonto, hän ajatteli. Minkäpä
sitä ihminen tekee luonnolleen. Eikä siitä näytä Neulasen olo ja
elämä paljoa paisuneen, vaikka hän kieli vyön alla kyliä hyppää ja
sotkee ihmisten asioita. Olisi sitä Neulasella muutakin työtä, mutta ei
vain jouda tekemään. Hänen pitää alituisesti kyliä kierrellä ja
lojaalisti asioita justeerailla.

Mikäpäs hätä tässä minulla, hän toisinaan taas ajatteli. Jos Jumala
suo ikää ja terveyttä, niin ensi syksynä viimeistään Terva-ahon
saunassa kylvetään ja kirkas savu nousee tuvan uunista kohti
korkeutta. Ja näin ajatellen Teemu taas entistä voimakkaammin iski
kuokkansa maan kamaraan tai veisti hirttä, että kangas kumisi…

Mutta nyt ei rakentajaa ole näkynyt viikkokauteen rakkailla


työmaillaan. Valkoinen lumi, talven ensi lumi on työmaan puhtaaksi
peittänyt, aivan kuin paariliina olisi sen päälle levitetty, ja rakentaja
itse makaa kuolemansairaana Aholan talon porstuanperäkamarissa.

Renkipoika on hakenut kirkolta sairaalle lääkärin.

— Ankara keuhkokuume, on lääkäri päätään pudistaen sanonut.


Ellei suorastaan ihmettä tapahdu, niin sairas ei enää aamua näe.

Hiljaa ja kuiskaillen liikkuvat ihmiset Teemun vuoteen lähellä. Eeva


istuu aivan sairaan sängyn vieressä ja lukee lakkaamatta raamattua.
Sairas ei kuule ei näe mitään. Lakkaamatta hän hourailee, höpisee
tuskin kuuluvasti.

Sairaan höpinöitä ei kukaan käsitä. Vaikka hän miten ponnistelisi


ja tahtoisi sanoa, että hän on unohtanut kaikki, antanut kaikki
anteeksi, ja että hänen on hyvä olla, niin kukaan ei hänen puhettaan
ymmärrä. Eeva kiihdyttää yhä lukuaan ja korottaa kyyneleistä
ääntään. Toiset huoneessaolijat katselevat totisin, vettynein silmin
tovin toisiinsa, tovin sairaaseen ja syvään huokaisten kääntävät
katseensa ulos ikkunasta.

Jokunen tumma tähti on jo syttynyt taivaalla, ja katsojista tuntuu,


että ne vilkuttavat niin ystävällisesti, ikäänkuin luokseen kutsuen…

Sairaan rinta nousee ja laskee, epäsäännöllisesti, nytkähdellen.


Henki salpautuu. Kuuluu korahdus. Vielä kerran kohoaa polttava
rinta, painuu kuin huokaisten alas, eikä enää sen jälkeen
elonmerkkiä anna.

Hiljaa ja rauhallisesti päättyi Teemun vaellus.

Kuulumattomasti putosi viimeinenkin hiekkajyvänen hänen


elämänsä tiimalasista, kuin santaan valahtaen…
*** END OF THE PROJECT GUTENBERG EBOOK MÖKISTÄ
MAANTIELLE ***

Updated editions will replace the previous one—the old editions will
be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright in
these works, so the Foundation (and you!) can copy and distribute it
in the United States without permission and without paying
copyright royalties. Special rules, set forth in the General Terms of
Use part of this license, apply to copying and distributing Project
Gutenberg™ electronic works to protect the PROJECT GUTENBERG™
concept and trademark. Project Gutenberg is a registered trademark,
and may not be used if you charge for an eBook, except by following
the terms of the trademark license, including paying royalties for use
of the Project Gutenberg trademark. If you do not charge anything
for copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such as
creation of derivative works, reports, performances and research.
Project Gutenberg eBooks may be modified and printed and given
away—you may do practically ANYTHING in the United States with
eBooks not protected by U.S. copyright law. Redistribution is subject
to the trademark license, especially commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the free


distribution of electronic works, by using or distributing this work (or
any other work associated in any way with the phrase “Project
Gutenberg”), you agree to comply with all the terms of the Full
Project Gutenberg™ License available with this file or online at
www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand, agree
to and accept all the terms of this license and intellectual property
(trademark/copyright) agreement. If you do not agree to abide by all
the terms of this agreement, you must cease using and return or
destroy all copies of Project Gutenberg™ electronic works in your
possession. If you paid a fee for obtaining a copy of or access to a
Project Gutenberg™ electronic work and you do not agree to be
bound by the terms of this agreement, you may obtain a refund
from the person or entity to whom you paid the fee as set forth in
paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only be


used on or associated in any way with an electronic work by people
who agree to be bound by the terms of this agreement. There are a
few things that you can do with most Project Gutenberg™ electronic
works even without complying with the full terms of this agreement.
See paragraph 1.C below. There are a lot of things you can do with
Project Gutenberg™ electronic works if you follow the terms of this
agreement and help preserve free future access to Project
Gutenberg™ electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright law
in the United States and you are located in the United States, we do
not claim a right to prevent you from copying, distributing,
performing, displaying or creating derivative works based on the
work as long as all references to Project Gutenberg are removed. Of
course, we hope that you will support the Project Gutenberg™
mission of promoting free access to electronic works by freely
sharing Project Gutenberg™ works in compliance with the terms of
this agreement for keeping the Project Gutenberg™ name associated
with the work. You can easily comply with the terms of this
agreement by keeping this work in the same format with its attached
full Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.

1.E. Unless you have removed all references to Project Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project Gutenberg™
work (any work on which the phrase “Project Gutenberg” appears,
or with which the phrase “Project Gutenberg” is associated) is
accessed, displayed, performed, viewed, copied or distributed:
This eBook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this eBook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is derived


from texts not protected by U.S. copyright law (does not contain a
notice indicating that it is posted with permission of the copyright
holder), the work can be copied and distributed to anyone in the
United States without paying any fees or charges. If you are
redistributing or providing access to a work with the phrase “Project
Gutenberg” associated with or appearing on the work, you must
comply either with the requirements of paragraphs 1.E.1 through
1.E.7 or obtain permission for the use of the work and the Project
Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is posted


with the permission of the copyright holder, your use and distribution
must comply with both paragraphs 1.E.1 through 1.E.7 and any
additional terms imposed by the copyright holder. Additional terms
will be linked to the Project Gutenberg™ License for all works posted
with the permission of the copyright holder found at the beginning
of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files containing a
part of this work or any other work associated with Project
Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute this


electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the Project
Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or
expense to the user, provide a copy, a means of exporting a copy, or
a means of obtaining a copy upon request, of the work in its original
“Plain Vanilla ASCII” or other form. Any alternate format must
include the full Project Gutenberg™ License as specified in
paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™ works
unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or providing


access to or distributing Project Gutenberg™ electronic works
provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project Gutenberg™


electronic work or group of works on different terms than are set
forth in this agreement, you must obtain permission in writing from
the Project Gutenberg Literary Archive Foundation, the manager of
the Project Gutenberg™ trademark. Contact the Foundation as set
forth in Section 3 below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on, transcribe
and proofread works not protected by U.S. copyright law in creating
the Project Gutenberg™ collection. Despite these efforts, Project
Gutenberg™ electronic works, and the medium on which they may
be stored, may contain “Defects,” such as, but not limited to,
incomplete, inaccurate or corrupt data, transcription errors, a
copyright or other intellectual property infringement, a defective or
damaged disk or other medium, a computer virus, or computer
codes that damage or cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for


the “Right of Replacement or Refund” described in paragraph 1.F.3,
the Project Gutenberg Literary Archive Foundation, the owner of the
Project Gutenberg™ trademark, and any other party distributing a
Project Gutenberg™ electronic work under this agreement, disclaim
all liability to you for damages, costs and expenses, including legal
fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR
NEGLIGENCE, STRICT LIABILITY, BREACH OF WARRANTY OR
BREACH OF CONTRACT EXCEPT THOSE PROVIDED IN PARAGRAPH
1.F.3. YOU AGREE THAT THE FOUNDATION, THE TRADEMARK
OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL
NOT BE LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT,
CONSEQUENTIAL, PUNITIVE OR INCIDENTAL DAMAGES EVEN IF
YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of receiving
it, you can receive a refund of the money (if any) you paid for it by
sending a written explanation to the person you received the work
from. If you received the work on a physical medium, you must
return the medium with your written explanation. The person or
entity that provided you with the defective work may elect to provide
a replacement copy in lieu of a refund. If you received the work
electronically, the person or entity providing it to you may choose to
give you a second opportunity to receive the work electronically in
lieu of a refund. If the second copy is also defective, you may
demand a refund in writing without further opportunities to fix the
problem.

1.F.4. Except for the limited right of replacement or refund set forth
in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of damages.
If any disclaimer or limitation set forth in this agreement violates the
law of the state applicable to this agreement, the agreement shall be
interpreted to make the maximum disclaimer or limitation permitted
by the applicable state law. The invalidity or unenforceability of any
provision of this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation,


the trademark owner, any agent or employee of the Foundation,
anyone providing copies of Project Gutenberg™ electronic works in
accordance with this agreement, and any volunteers associated with
the production, promotion and distribution of Project Gutenberg™
electronic works, harmless from all liability, costs and expenses,
including legal fees, that arise directly or indirectly from any of the
following which you do or cause to occur: (a) distribution of this or
any Project Gutenberg™ work, (b) alteration, modification, or
additions or deletions to any Project Gutenberg™ work, and (c) any
Defect you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new computers.
It exists because of the efforts of hundreds of volunteers and
donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project Gutenberg™’s
goals and ensuring that the Project Gutenberg™ collection will
remain freely available for generations to come. In 2001, the Project
Gutenberg Literary Archive Foundation was created to provide a
secure and permanent future for Project Gutenberg™ and future
generations. To learn more about the Project Gutenberg Literary
Archive Foundation and how your efforts and donations can help,
see Sections 3 and 4 and the Foundation information page at
www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-profit
501(c)(3) educational corporation organized under the laws of the
state of Mississippi and granted tax exempt status by the Internal
Revenue Service. The Foundation’s EIN or federal tax identification
number is 64-6221541. Contributions to the Project Gutenberg
Literary Archive Foundation are tax deductible to the full extent
permitted by U.S. federal laws and your state’s laws.

The Foundation’s business office is located at 809 North 1500 West,


Salt Lake City, UT 84116, (801) 596-1887. Email contact links and up
to date contact information can be found at the Foundation’s website
and official page at www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission of
increasing the number of public domain and licensed works that can
be freely distributed in machine-readable form accessible by the
widest array of equipment including outdated equipment. Many
small donations ($1 to $5,000) are particularly important to
maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws regulating


charities and charitable donations in all 50 states of the United
States. Compliance requirements are not uniform and it takes a
considerable effort, much paperwork and many fees to meet and
keep up with these requirements. We do not solicit donations in
locations where we have not received written confirmation of
compliance. To SEND DONATIONS or determine the status of
compliance for any particular state visit www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states where


we have not met the solicitation requirements, we know of no
prohibition against accepting unsolicited donations from donors in
such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot make


any statements concerning tax treatment of donations received from
outside the United States. U.S. laws alone swamp our small staff.

Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could be
freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose network of
volunteer support.
Project Gutenberg™ eBooks are often created from several printed
editions, all of which are confirmed as not protected by copyright in
the U.S. unless a copyright notice is included. Thus, we do not
necessarily keep eBooks in compliance with any particular paper
edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg Literary
Archive Foundation, how to help produce our new eBooks, and how
to subscribe to our email newsletter to hear about new eBooks.

You might also like