Professional Documents
Culture Documents
Asphalt Shingles Data Analysis PDF
Asphalt Shingles Data Analysis PDF
import numpy as np
import copy
import pylab
import math
%matplotlib inline
import os
import warnings
warnings.filterwarnings('ignore')
df.head(10)
Out[32]: A B
0 0.44 0.14
1 0.61 0.15
2 0.47 0.31
3 0.30 0.16
4 0.15 0.37
5 0.24 0.18
6 0.16 0.42
7 0.20 0.58
8 0.20 0.25
9 0.20 0.41
In [3]:
df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 36 entries, 0 to 35
# Column
This study source was downloaded Non-Null from
by 100000840671323 Count Dtype on
CourseHero.com
01-29-2022 05:17:29 GMT -06:00
localhost:8888/nbconvert/html/Asphalt Shingles Data Analysis.ipynb?download=false 1/4
https://www.coursehero.com/file/108841153/Asphalt-Shingles-Data-Analysispdf/
8/30/2021 Asphalt Shingles Data Analysis
0 A 36 non-null float64
1 B 31 non-null float64
dtypes: float64(2)
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 36 entries, 0 to 35
0 A 36 non-null float64
1 B 31 non-null float64
dtypes: float64(2)
In [11]:
df.isnull().sum()
Out[11]: A 0
B 5
dtype: int64
df.shape
Out[31]: (31, 2)
In [21]:
df.isnull().sum() # Additional Validation
Out[21]: A 0
B 0
dtype: int64
In [35]:
df.describe() ## Performed to understand if 5 point summary of the data.
Out[35]: A B
A B
print('One sample t test \nt statistic: {0} p value: {1} '.format(t_statistic, p_val
Since pvalue > 0.05, do not reject H0 . There is not enough evidence to conclude that the mean moisture
content for Sample A shingles is less than 0.35 pounds per 100 square feet. p-value = 0.0748. If the population
mean moisture content is in fact no less than 0.35 pounds per 100 square feet, the probability of observing a
sample of 36 shingles that will result in a sample mean moisture content of 0.3167 pounds per 100 square feet or
less is .0748.
In [23]:
t_statistic, p_value = ttest_1samp(df.B, 0.35,nan_policy='omit' ) #FOR COLUMN B
print('One sample t test \nt statistic: {0} p value: {1} '.format(t_statistic, p_val
Since pvalue < 0.05, reject H0 . There is enough evidence to conclude that the mean moisture content for
Sample B shingles is not less than 0.35 pounds per 100 square feet. p-value = 0.0021. If the population mean
moisture content is in fact no less than 0.35pounds per 100 square feet, the probability of observing a sample of
31 shingles that will result in a sample mean moisture content of 0.2735 pounds per 100 square feet or less is
.0021.
#α = 0.05
t_statistic,p_value=ttest_ind(df['A'],df['B'],equal_var=True ,nan_policy='omit')
In [ ]:
This study source was downloaded by 100000840671323 from CourseHero.com on 01-29-2022 05:17:29 GMT -06:00
In [ ]:
In [ ]:
In [ ]:
This study source was downloaded by 100000840671323 from CourseHero.com on 01-29-2022 05:17:29 GMT -06:00