Mc5502 Bda Unit I Notes
Mc5502 Bda Unit I Notes
0
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Syllabus:
Table of Contents
4 Nature of Data 32
6 Analysis vs Reporting 41
9 Re-Sampling 75
10 Statistical Inference 90
1
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
For example: When you visit any website, they might store you IP address, that is data,
in return they might add a cookie in your browser, marking you that you visited the
website, that is data, your name, it's data, your age, it's data.
• What is Data?
– The quantities, characters, or symbols on which operations are performed by a
computer,
– which may be stored and transmitted in the form of electrical signals and
– recorded on magnetic, optical, or mechanical recording media.
• 3 Actions on Data
– Capture
– Transform
– Store
BigData
• Big Data may well be the Next Big Thing in the IT world.
• Big data burst upon the scene in the first decade of the 21st century.
2
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Examples of Bigdata
3
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
• Any data that can be stored, accessed and processed in the form of fixed format is
termed as a 'structured' data.
• Developed techniques for working with such kind of data (where the format is well
known in advance) and also deriving value out of it.
• Foreseeing issues of today :
– when a size of such data grows to a huge extent, typical sizes are being in the rage
of multiple zetta bytes.
• Do you know?
• 1021 bytes equal to 1 zettabyte or one billion terabytes forms a zettabyte.
– That is why the name Big Data is given and imagine the challenges involved in
its storage and processing?
• Do you know?
– Data stored in a relational database management system is one example of
a 'structured' data.
Unstructured Data
• Any data with unknown form or the structure is classified as unstructured data.
• In addition to the size being huge,
– un-structured data poses multiple challenges in terms of its processing for
deriving value out of it.
– A typical example of unstructured data is
• a heterogeneous data source containing a combination of simple text files,
images, videos etc.
• Now day organizations have wealth of data available with them but unfortunately,
– they don't know how to derive value out of it since this data is in its raw form or
unstructured format.
Semi-structured Data
5
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
</rec>
<rec>
<name>Satish Mane</name>
<sex>Male</sex>
<age>29</age>
</rec>
<rec>
<name>Subrato Roy</name>
<sex>Male</sex>
<age>26</age>
</rec>
<rec>
<name>Jeremiah J.</name>
<sex>Male</sex>
<age>35</age></rec>
6
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
• Users
• Application
• Systems
• Sensors
8
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Moved to
• Will be so overwhelmed
– Need the right people and solve the right problems
• Costs escalate too fast
– Isn’t necessary to capture 100%
• Many sources of big data is privacy
– self-regulation
– Legal regulation
9
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Big Data platform is IT solution which combines several Big Data tools and utilities into
one packaged solution for managing and analyzing Big Data.
Big data platform is a type of IT solution that combines the features and capabilities of
several big data application and utilities within a single solution.
It is an enterprise class IT platform that enables organization in developing, deploying,
operating and managing a big data infrastructure /environment.
10
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
a) Big Data platform should be able to accommodate new platforms and tool based on the
business requirement. Because business needs can change due to new technologies or
due to change in business process.
b) It should support linear scale-out
c) It should have capability for rapid deployment
d) It should support variety of data format
e) Platform should provide data analysis and reporting tools
f) It should provide real-time data analysis software
g) It should have tools for searching the data through large data sets
Big data is a term for data sets that are so large or complex that traditional data processing
applications are inadequate.
Challenges include
Analysis,
Capture,
Data Curation,
Search,
Sharing,
Storage,
Transfer,
Visualization,
Querying,
Updating
Information Privacy.
The term often refers simply to the use of predictive analytics or certain other
advancedmethods to extract value from data, and seldom to a particular size of data set.
ACCURACY in big data may lead to more confident decision making, and better
decisions can result in greater operational efficiency, cost reduction and reduced risk.
Big data usually includes data sets with sizes beyond the ability of commonly used
software tools to capture, curate, manage, and process data within a tolerable elapsed
time. Big data "size" is a constantly moving target.
Big data requires a set of techniques and technologies with new forms of integration to
reveal insights from datasets that are diverse, complex, and of a massive scale
11
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
a) Hadoop
What is Hadoop?
Hadoop is open-source, Java based programming framework and server software which
is used to save and analyze data with the help of 100s or even 1000s of commodity
servers in a clustered environment.
Hadoop is designed to storage and process large datasets extremely fast and in fault
tolerant way.
Hadoop uses HDFS (Hadoop File System) for storing data on cluster of commodity
computers. If any server goes down it know how to replicate the data and there is no loss
of data even in hardware failure.
Hadoop is Apache sponsored project and it consists of many software packages which
runs on the top of the Apache Hadoop system.
Top Hadoop based Commercial Big Data Analytics Platform
Hadoop provides set of tools and software for making the backbone of the Big Data
analytics system.
Hadoop ecosystem provides necessary tools and software for handling and analyzing
Big Data.
On the top of the Hadoop system many applications can be developed and plugged-in to
provide ideal solution for Big Data needs.
b) Cloudera
12
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Cloudra is one of the first commercial Hadoop based Big Data Analytics Platform
offering Big Data solution.
Its product range includes Cloudera Analytic DB, Cloudera Operational DB, Cloudera
Data Science & Engineering and Cloudera Essentials.
All these products are based on the Apache Hadoop and provides real-time processing
and analytics of massive data sets.
Website: https://www.cloudera.com
d) Hortonworks
Hortonworks is using 100% open-source software without any propriety software.
Hortonworks were the one who first integrated support for Apache HCatalog.
The Hortonworks is a Big Data company based in California.
This company is developing and supports application for Apache Hadoop.
Hortonworks Hadoop distribution is 100% open source and its enterprise ready with following
features:
13
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
e) MapR
MapR is another Big Data platform which us using the Unix file system for handling
data.
It is not using HDFS and this system is easy to learn anyone familiar with the Unix
system.
This solution integrates Hadoop, Spark, and Apache Drill with a real-time data
processing feature.
Website: https://mapr.com
Website: https://www.ibm.com/analytics/us/en/technology/hadoop/
14
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
g) Microsoft HDInsight
The Microsoft HDInsight is also based on the Hadoop distribution and it’s a commercial
Big Data platform from Microsoft.
Microsoft is software giant which is into development of windows operating system for
Desktop users and Server users.
This is the big Hadoop distribution offering which runs on the Windows and Azure
environment.
It offer customized, optimized open source Hadoop based analytics clusters which uses
Spark, Hive, MapReduce, HBase, Strom, Kafka and R Server which runs on the Hadoop
system on windows/Azure environment.
Website: https://azure.microsoft.com/en-in/services/hdinsight/
Website: http://www.intel.com/content/www/us/en/software/intel-distribution-for-apache-
hadoop-software-solutions.html
It provides powerful indexing, search, analytics and graph functionality into the Big
Data system
It supports advanced indexing and searching features
15
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Teradata
Teradata Aster and
Hadoop
as part of its package solution.
Website: http://www.teradata.com
k) Pivotal HD
Pivotal HD offers is another Hadoop distribution with includes includes database tools
Greenplum and analytics platform Gemfire.
Features:
16
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Website: https://pivotal.io/
There are various open-source Big Data Platform which can be used for Big Data handling and
data analytics in real-time environment.
Both small and Big Enterprise can use these tools for managing their enterprise data for getting
best value from their enterprise data.
i) Apache Hadoop
Apache Hadoop is Big Data platform and software package which is Apache sponsored
project.
Under Apache Hadoop project various other software is being developed which runs on
the top of Hadoop system to provide enterprise grade data management and analytics
solutions to enterprise.
Apache Hadoop is open-source, distributed file system which provides data processing
and analysis engine for analyzing large set of data.
Hadoop can run on Windows, Linux and OS X operating systems, but it is mostly used
on Ubunut and other Linux variants.
ii) MapReduce
The MapReduce engine was originally written by Google and this is the system which
enables the developers to write program which can run in parallel on 100 or even 1000s
of computer nodes to process vast data sets.
After processing all the job on the different nodes it comes the results and return it to the
program which executed the MapReduce job.
This software is platform independent and runs on the top of Hadoop ecosystem. It can
process tremendous data at very high speed in Big Data environment.
iii) GridGain
GridGain is another software system for parallel processing of data just like MapRedue.
GridGain is an alternative of Apache MapReduce.
17
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
GridGain is used for the processing of in-memory data and its is based on Apache Iginte
framework.
GridGain is compatable with the Hadoop HDFS and runs on the top of Hadoop
ecosystem.
Then enterprise version of GridGain can be purchased from official website of
GridGain. While free version can be downloaded from GitHub repository.
Website: https://www.gridgain.com/
v) Apache Storm
Apache Storm is a software for real-time computing and distributed processing.
Its free and open-source software developed at Apache Software foundation. It’s a real-
time, parallel processing engine.
Apache Storm is highly scalable, fault-tolerant which supports almost all the
programming language.
Realtime analytics
Online machine learning
18
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Continuous computation
Distributed RPC
ETL
And all other places where real-time processing is required.
Apache Strom is used by Yahoo, Twitter, Spotify, Yelp, Flipboard and many other data giants.
Website: http://storm.apache.org/
viii) SAMOA
SAMOA stands for Scalable Advanced Massive Online Analysis,
It’s a system for mining the Big Data streams.
SAMOA is open-source software distributed at GitHub, which can be used as distributed
machine learning framework also.
Website: https://github.com/yahoo/samoa
Thus, the Big Data industry is growing very fast in 2017 and companies are fast moving
their data to Big Data Platform. There is huge requirement of Big Data in the job market;
many companies are providing training and certifications in Big Data technologies.
*********************
19
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Conventional Systems.
The system consists of one or more zones each having either manually operated call
points or automatic detection devices, or a combination of both.
Big data is huge amount of data which is beyond the processing capacity
ofconventional data base systems to manage and analyze the data in a specific time
interval.
The conventional computing functions logically with a set of rules and calculations
while the neural computing can function via images, pictures, and concepts.
Conventional computing is often unable to manage the variability of data obtained in the
real world.
On the other hand, neural computing, like our own brains, is well suited to situations that
have no clear algorithmic solutions and are able to manage noisy imprecise data. This
allows them to excel in those areas that conventional computing often finds difficult.
Used for reporting, basic analysis, and Used for reporting, advanced analysis, and
text mining. Advanced analytics is only in predictive modeling .
a starting stage in big data.
Big data analysis needs both Analytical skills are sufficient for
programming skills (such as Java) and conventional data; advanced analysis tools
analytical skills to perform analysis. don’t require expert programing skills.
The following list of challenges has been dominating in the case Conventional systems in real
time scenarios:
Because big data is continuously expanding, there are new companies and technologies
that are being developed everyday.
21
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
A big challenge for companies is to find out which technology works bests for them
without the introduction of new risks and problems.
While Big Data is a growing field, there are very few experts available in this field.
This is because Big data is a complex field and people who understand the complexity
and intricate nature of this field are far few and between.
3) The talent gap that exists in the industry Getting data into the big data platform:
Data is increasing every single day. This means that companies have to tackle limitless
amount of data on a regular basis.
The scale and variety of data that is available today can overwhelm any data practitioner
and that is why it is important to make data accessibility simple and convenient for
brand mangers and owners.
1. Data
2. Process
3. Management
1. Data Challenges
22
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Volume
Social media plays a key role: Twitter generates 7+ terabytes (TB) of data every day. Facebook,
10 TB.
•Mobile devices play a key role as well, as there were estimated 6 billion mobile phones in
2011.
•The challenge is how to deal with the size of Big Data.
Variety•A lot of this data is unstructured, or has a complex structure that’s hard to represent in
rows and columns.
2. Processing
More than 80% of today’s information isunstructured and it is typically too big to
manage effectively.
Today, companies are looking to leverage a lot more data from a wider variety of
sources both inside and outside the organization.
Things like documents, contracts, machine data, sensor data, social media, health
records, emails, etc. The list is endless really.
23
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
3. Management
A lot of this data is unstructured, or has acomplex structure that’s hard to represent in
rows and columns.
b) Visualization helps organizations perform analyses and make decisions much more
rapidly, but the challenge is going through the sheer volumes of data and accessing the
level of detail needed, all at a high speed.
c) The challenge only grows as the degree of granularity increases. One possible solution
is hardware. Some vendors are using increased memory and powerful parallel
processing to crunch large volumes of data extremely quickly
24
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Visual analytics enables organizations to take raw data and present it in a meaningful
way that generates the most value. However, when used with big data, visualization is
bound to lead to some challenges.
**************
25
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Intelligent Data Analysis (IDA) is one of the hot issues in the field of
artificial intelligence and information.
IDA is
… used for extracting useful information from large quantities of online data; extracting
desirable knowledge or interesting patterns from existing databases;
the distillation of information that has been collected, classified, organized, integrated,
abstracted and value-added;
at a level of abstraction higher than the data, and information on which it is based and
can be used to deduce new information and new knowledge;
the distillation of information that has been collected, classified, organized, integrated,
abstracted and value-added;
at a level of abstraction higher than the data, and information on which it is based and
can be used to deduce new information and new knowledge;
Goal:
Goal of Intelligent data analysis is to extract useful knowledge, the process demands a
combination of extraction, analysis, conversion, classification, organization, reasoning, and so
on.
26
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Intelligent Data Analysis provides a forum for the examination of issues related to the research
and applications of Artificial Intelligence techniques in data analysis across a variety of
disciplines and the techniques include (but are not limited to):
Data Visualization
Data pre-processing (fusion, editing, transformation, filtering, sampling)
Data Engineering
Database mining techniques, tools and applications
Use of domain knowledge in data analysis
Big Data applications
Evolutionary algorithms
Machine Learning(ML)
Neural nets
Fuzzy logic
Statistical pattern recognition
Knowledge Filtering and
Post-processing
Why IDA?
Multidimensionality of problems is looking for methods for adequate and deep data
processing and analysis
27
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
2 – they were ill (drug treatment, positive clinical and laboratory findings)
Knowledge Acquisition
The process of eliciting, analyzing, transforming, classifying, organizing and integrating
knowledge and representing that knowledge in a form that can be used in a computer
system.
A Rule :
Example of IDA
2 – they were ill (drug treatment, positive clinical and laboratory findings)
28
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
application.names - lists the classes to which cases may belong and the attributes
used to describe each case.
Attributes are of two types: discrete attributes have a value drawn from a set of
possibilities, and continuous attributes have numeric values.
application.data - provides information on the training cases from which See5 will
extract patterns.
The entry for each case consists of one or more lines that give the values for all
attributes.
application.data - provides information on the training cases from which See5 will
extract patterns.
The entry for each case consists of one or more lines that give the values for all
attributes.
The entry for each case consists of one or more lines that give the values for all
attributes.
Goal 1.1 :
application.names – example
gender:M,F
activity:1,2,3
age: continuous
smoking: No, Yes
…
29
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Goal:1,2 :
application.data – example
M,1,59,Yes,0,0,0,0,119,73,103,86,247,87,15979,?,?,?,1,73,2.5
M,1,66,Yes,0,0,0,0,132,81,183,239,?,783,14403,27221,19153,23187,1,73,2.6
M,1,61,No,0,0,0,0,130,79,148,86,209,115,21719,12324,10593,11458,1,74,2.5
… …
Result:
Results – example
30
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Sensitivity=0.97
Specificity=0.81
Sensitivity=0.97
Specificity=0.81
Sensitivity=0.98
Specificity=0.90
31
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
1. 4 NATURE OF DATA
1.4.1 INTRODUCTION
Data
Properties of Data
For examining the properties of data, reference to the various definitions of data.
Reference to these definitions reveals that following are the properties of data:
a) Amenability of use
b) Clarity
c) Accuracy
d) Essence
e) Aggregation
f) Compression
g) Refinement
.
a) Amenability of use: From the dictionary meaning of data it is learnt that data are facts
used in deciding something. In short, data are meant to be used as a base for arriving at
definitive conclusions.
b) Clarity: Data are a crystallized presentation. Without clarity, the meaning desired to be
communicated will remain hidden.
c) Accuracy: Data should be real, complete and accurate. Accuracy is thus, an essential
property of data.
d) Essence: A large quantities of data are collected and they have to be Compressed and
refined. Data so refined can present the essence or derived qualitative value, of the
matter.
32
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
f) Compression: Large amounts of data are always compressed to make them more
meaningful. Compress data to a manageable size.Graphs and charts are some examples
of compressed data.
g) Refinement: Data require processing or refinement. When refined, they are capable of
leading to conclusions or even generalizations. Conclusions can be drawn only when
data are processed or refined.
In order to understand the nature of data it is necessary to categorize them into various
types.
Different categorizations of data are possible.
The first such categorization may be on the basis of disciplines, e.g., Sciences, Social
Sciences, etc. in which they are generated.
Within each of these fields, there may be several ways in which data can be categorized into
types.
Nominal
Ordinal
Interval
Ratio
Each offers a unique set of characteristics, which impacts the type of analysis that can be
performed.
33
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
The distinction between the four types of scales center on three different characteristics:
34
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
True Zero: There is no true or real zero. An item, observation, or category cannot finish
zero.
Appropriate statistics for ordinal scales: count, frequencies, mode
Displays: histograms or bar charts
We can convert or transform our data from ratio to interval to ordinal to nominal.
However, we cannot convert or transform our data from nominal to ordinal to interval
to ratio.
Example:
1st Place 2nd Place 3rd Place
Example :
60 degrees 12.5 feet 80 Miles per hour
In this case, 93% of all hospital have lower patient satisfaction scores than Eastridge hospital.
31% have lower satisfaction scores than Westridge Hospital.
Thus the nature of data and its value have great influence on data insight in it.
***********************
37
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
2. Business Understanding
3. Data Exploration
4. Data Preparation
5. Data Modeling
6. Data Evaluation
38
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Step 1: Deployment
– In this phase,
• Business Understanding
– For the further process, we need to gather initial data, describe and explore the
data and verify data quality to ensure it contains the data we require.
39
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
– Data collected from the various sources is described in terms of its application
and the need for the project in this phase.
– we need to select data as per the need, clean it, construct it to get useful
information and
• Data is selected, cleaned, and integrated into the format finalized for the analysis in this
phase.
• we need to
– select a modeling technique, generate test design, build a model and assess the
model built.
• The data model is build to
– analyze relationships between various selected objects in the data,
– test cases are built for assessing the model and model is tested and implemented
on the data in this phase.
Thus the BDA tools are used through out the BDA applications development.
******************
What is Analysis?
• The process of exploring data and reports
– in order to extract meaningful insights,
– which can be used to better understand and improve business performance.
• What is Reporting ?
• Reporting is
41
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
42
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Analysis Reporting
Provides what is needed Provides what is asked for
Is typically customized Is Typically standardized
Involves a person Does not involve a person
Is extremely flexible Is fairly Inflexible
Reports are like Robots n monitor and alter you and where as analysis is like parents - c
an figure out what is going on (hungry, dirty diaper, no pacifier, , teething, tired, ear
infection, etc).
Reporting and analysis can go hand-in-hand:
Reporting provides no limited context about what is happening in the data. Context is
critical to good analysis.
Reporting translate a raw data into information
Reporting usually raises a question – What is happening ?
Analysis transforms the data into insights - Why is it happening ? What you can do
about it?
Thus, Analysis and Reporting is synonym to each other with respect their need and utilizing
in the needy context.
*****************
43
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
44
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
b) Apache flink
• Apache flink is
– an open source platform
– which is a streaming data flow engine that provides communication fault
tolerance and
– data distribution computation over data stream .
– flink is a top level project of Apache flink is scalable data analytics framework
that is fully compatible to hadoop .
– flink can execute both stream processing and batch processing easily.
– flink was designed as an alternative to map-reduce.
c) Kinesis
– Kinesis as an out of the box streaming data tool.
– Kinesis comprises of shards which Kafka calls partitions.
45
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
a) Google’s Dremel is the google proposed an interactive analysis system in 2010. And
named named Dremel.
– which is scalable for processing nested data.
– Dremel provides
• a very fast SQL like interface to the data by using a different technique
than MapReduce.
• Dremel has a very different architecture:
– compared with well-known Apache Hadoop, and
– acts as a successful complement of Map/Reduce-based computations.
46
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
b) Apache drill
• Apache drill is:
– Drill is an Apache open-source SQL query engine for Big Data exploration.
– It is similar to Google’s Dremel.
• For Drill, there is:
– more flexibility to support
• a various different query languages,
• data formats and
• data sources.
• Drill is designed from the ground up to:
– support high-performance analysis on the semi-structured and
– rapidly evolving data coming from modern Big Data applications.
• Drill provides plug-and-play integration with existing Apache Hive and Apache
HBase deployments.
47
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
a) MapReduce Model
Jeffrey Dean et al. MapReduce: Simplified Data Processing on Large Clusters.
OSDI 2004.
b) Apache Hadoop (2005)
Apache Hadoop YARN: Yet Another Resource Negotiator, SOCC 2013.
Key Features of MapReduce Model
Designed for clouds
Large clusters of commodity machines
Designed for big data
Support from local disks based distributed file system (GFS / HDFS)
Disk based intermediate data transfer in Shuffling
MapReduce programming model
Computation pattern: Map tasks and Reduce tasks
Data abstraction: KeyValue pairs
• HaLoop
• An efficient Data Processing on Large clusters
• Have features:
– Loop-Aware Task Scheduling
– Caching and Indexing for Loop-Invariant Data on local disk.
48
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Graph Model
• Graph Processing with BSP model
• Pregel (2010)
– A System for Large-Scale Graph Processing. SIGMOD 2010.
– Apache Hama (2010)
• Apache Giraph (2012)
– Scaling Apache Giraph to a trillion edges
GraphLab (2010)
• GraphLab: A New Parallel Framework for Machine Learning. UAI 2010.
• Distributed GraphLab: A Framework for Machine Learning and Data Mining in the
Cloud.
• Data graph
• Update functions and the scope
49
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
• PowerGraph (2012)
– PowerGraph: Distributed Graph-Parallel Computation on Natural Graphs.
– Gather, apply, Scatter (GAS) model
• GraphX (2013)
– A Resilient Distributed Graph System on Spark. GRADES
Collective Model
• Harp (2013)
– A Hadoop Plugin (on Hadoop 1.2.1 and Hadoop 2.2.0)
– Hierarchical data abstraction on arrays, key-values and graphs for easy
programming expressiveness.
– Collective communication model to support various communication operations
on the data abstractions.
– Caching with buffer management for memory allocation required from
computation and communication
– BSP style parallelism
– Fault tolerance with check-pointing.
Thus the modern analytical tools play an important role in the modern data world.
**********
50
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Statistics is a very broad subject, with applications in a vast number of different fields.
In generally one can say that statistics is the methodology for collecting, analyzing,
interpreting and drawing conclusions from information.
Putting it in other words, statistics is the methodology which scientists and
mathematicians have developed for interpreting and drawing conclusions from collected
data.
Everything that deals even remotely with the collection, processing, interpretation and
presentation of data belongs to the domain of statistics, and so does the detailed planning
of that precedes all these activities.
• Data consists of
– information coming from observations, counts, measurements, or responses.
Statistics is :
-science of collecting, organizing, analyzing, and interpreting data in order to make
decisions.
A population is:
- the collection of all outcomes, responses, measurement, or counts that are of
interest.
A sample is:
- a subset of a population.
What is statistics?
Definition 1.1 (Statistics). Statistics consists of a body of methods for collecting and analyzing
data. (Agresti & Finlay, 1997)
Statistics is much more than just the tabulation of numbers and the graphical
presentation of these tabulated numbers.
Statistics is the science of gaining information from numerical and categorical data.
Categorical data (or qualitative data) results from descriptions, e.g. the blood type of
person, marital status or religious affiliation.
Why Statistics ?
Statistics is the science of dealing with uncertain phenomenon and events.
52
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
53
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Data shape
FIGURE 1. Displaying different data shapes with median, mean, density respectively.
Definition Sample: Sample is that part of the population from which information is collected.
(Weiss, 1999)
A population is:
- the collection of all outcomes, responses, measurement, or counts that are of
interest.
A sample is:
- a subset of a population.
A parameter is
-a numerical description of a population characteristic.
A statistic is:
- a numerical description of a sample characteristic.
55
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Statistical process
Variable: -
• Any characteristic of an individual or entity.
• A variable can take different values for different individuals.
56
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Application Areas
• Economics
– Forecasting
– Demographics
57
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
• Sports
– Individual & Team Performance
• Engineering
– Construction
– Materials
• Business
– Consumer Preferences
– Financial Trends
1. Experimental unit
• Object upon which we collect data
2. Population
• All items of interest
3. Variable
• Characteristic of an individual
experimental unit
4. Sample
• Subset of the units of a population
58
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
5. Statistical Inference
• Estimate or prediction or generalization about a population based on information
contained in a sample
6. Measure of Reliability
• Statement (usually qualified) about the degree of uncertainty associated with a
statistical inference
The study of statistics has two major branches: descriptive statistics and inferential statistics.
• Descriptive statistics: –
– Methods of organizing, summarizing, and presenting data in an informative way.
– Involves: Collecting Data
Presenting Data
Characterizing Data
Purpose
Describe Data
• Inferential statistics: –
– The methods used to determine something about a population on the basis of a
sample:
59
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
• Example:
• In a recent study, volunteers who had less than 6 hours of sleep were four times more
likely to answer incorrectly on a science test than were participants who had at least 8
hours of sleep.
• Decide which part is the descriptive statistic and what conclusion might be drawn using
inferential statistics?
Answer:-
The statement “four times more likely to answer incorrectly” is a descriptive statistic.
An inference drawn from the sample is that
all individuals sleeping less than 6 hours are more likely to answer science question
incorrectly than individuals who sleep at least 8 hours.
Involves
• Estimation
• Hypothesis
Testing
Purpose
• Make decisions about population characteristics
• Estimation:-
– e.g., Estimate the population mean weight using the sample mean weight
• Hypothesis testing:-
– e.g., Test the claim that the population mean weight is 70 kg
61
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Why sample?
– Resources (time, money) and workload
– Gives results with known accuracy that can be calculated mathematically
• The sampling frame is the list from which the potential respondents are drawn
– Registrar’s office
– Class rosters
– Must assess sampling frame errors
62
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
1. Stratified Samples
2. Cluster Samples
3. Systematic Samples
4. Convenience Samples
1. Stratified Samples
A stratified sample has:
i. members from each segment of a population.
ii. This ensures that each segment from the population is represented.
2. Cluster Samples
63
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
3. Systematic Samples
• A systematic sample is
• a sample in which each member of the population is assigned a number.
• A starting number is
• randomly selected and sample members are selected at regular intervals.
4. Convenience Samples
A convenience sample consists only of available members of the population.
Example:
You are doing a study to determine the number of years of education each teacher at
your college has.
Identify the sampling technique used if you select the samples listed.
64
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
• From Vogt:
A theoretical frequency distribution of the scores for or values of a
statistic, such as a mean.
– Any statistic that can be computed for a sample has a sampling distribution.
• Sampling distributions is
– all possible values of a statistic and
– their probabilities of occurring for a sample of a particular size.
• Sampling distributions are used to
– calculate the probability that sample statistics
– could have occurred by chance and
– thus to decide whether something that is true of a sample statistic is
• also likely to be true of a population parameter.
65
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Take another sample of size 1,500 from the US. Record the mean income. Our census
said the mean is $30K.
Take another sample of size 1,500 from the US. Record the mean income. Our census
said the mean is $30K.
Take another sample of size 1,500 from the US. Record the mean income. Our census
said the mean is $30K.
….
Say that the standard deviation of this distribution is $10K.
Think back to the empirical rule. What are the odds you would get a sample mean that
is more than $20K off.
Knowing the likely variability of the sample means from repeated sampling gives us a
context within which to judge how much we can trust the number we got from our
sample.
For example, if the variability is low, , we can trust our number more than if the
variability is high, .
67
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Statisticians have found that the standard error of a sampling distribution is quite
directly affected by the number of cases in the sample(s), and the variability of the
population distribution.
Population Variability:
For example, Americans’ incomes are quite widely distributed, from $0 to Bill Gates’.
Americans’ car values are less widely distributed, from about $50 to about $50K.
The standard error of the latter’s sampling distribution will be a lot less variable.
68
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Population Variability:
The standard error of income’s sampling distribution will be a lot higher than car price’s.
Standard error :
The sample size affects the sampling distribution too:
Standard error = population standard deviation / square root of sample size
Y-bar= /n
So why are sampling distributions less variable when sample size is larger?
Example 1:
• Think about what kind of variability you would get
– if you collected income through repeated samples of size 1 each.
• Contrast that with the variability you would get:
– if you collected income through repeated samples of size N – 1 (or 300 million
minus one) each.
Example 2:
• Think about drawing the population distribution and playing “darts” where the mean is
the bull’s-eye. Record each one of your attempts.
• Contrast that with playing “darts” but doing it in rounds of 30 and recording the average
of each round.
70
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
• What kind of variability will you see in the first versus the second way of recording your
scores.
…Now, do you trust larger samples to be more accurate?
An Example:
A population’s car values are = $12K with = $4K.
Which sampling distribution is for sample size 625 and which is for 2500? What are
their s.e.’s?
An Example:
A population’s car values are = $12K with = $4K.
Which sampling distribution is for sample size 625 and which is for 2500? What are
their s.e.’s?
s.e. = $4K/25 = $160 s.e. = $4K/50 = $80
(625 = 25) (2500 = 50)
71
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
1. For a random sample of size n from a population having mean and standard deviation
, the sampling distribution of Y-bar (glitter-bar?) has mean and standard error Y-bar
= /n
2. The Central Limit Theorem says that for random sampling, as the sample size n grows,
the sampling distribution of Y-bar approaches a normal distribution.
3. The sampling distribution will be normal no matter what the population distribution’s
shape as long as n > 30.
72
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
4. If n < 30, the sampling distribution is likely normal only if the underlying population’s
distribution is normal.
5. As n increases, the standard error (remember that this word means standard deviation of
the sampling distribution) gets smaller.
6. Precision provided by any given sample increases as sample size n increases.
Probability Distributions
• A Note:
– Not all theoretical probability distributions are Normal. One example of many is
the binomial distribution.
• The binomial distribution gives
– the discrete probability distribution of obtaining exactly n successes out of N
trials
• where the result of each trial is true with known probability of success
and false with the inverse probability.
• The binomial distribution has
– a formula and
– changes shape with each probability of success and number of trials.
73
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
• However, in this class the normal probability distribution is the most useful!
• Population Distribution
• Sampling Distribution
Population Distribution
Definition
The population distribution is the probability distribution of the population data.
• Suppose there are only five students in an advanced statistics class and the midterm
scores of these five students are:
70 78 80 80 95
• Let x denote the score of a student
x f Relative Frequency
70 1 1/5 = .20
78 1 1/5 = .20
80 2 2/5 = .40
95 1 1/5 = .20
74
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
x P (x)
70 .20
78 .20
80 ΣP (x)
.40= 1.00
95 .20
Definition
The probability distribution of is called its sampling distribution.
x
It lists the various values that can assume and the probability of each value of .
In general, the probability distribution of a sample statistic is called its sampling
distribution.
*****************
1.9 RE-SAMPLING
What is re-sampling?
• Re-sampling is:
– the method that consists of drawing repeated samples from the original data
samples.
• The method of Resampling is
– a nonparametric method of statistical inference. ...
• The method of resampling uses:
– experimental methods, rather than analytical methods, to generate the unique
sampling distribution.
75
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Re-sampling in statistics
• In statistics, re-sampling is any of a variety of methods for doing one of the following:
– Estimating the precision of sample statistics (medians, variances, percentiles)
– by using subsets of available data (jackknifing) or drawing randomly with
replacement from a set of data points (bootstrapping)
• Re-sampling involves:
– the selection of randomized cases with replacement from the original data sample
• in such a manner that each number of the sample drawn has a number of
cases that are similar to the original data sample.
• Due to replacement:
– the drawn number of samples that are used by the method of re-sampling consists
of repetitive cases.
• Re-sampling generates a unique sampling distribution on the basis of the actual data.
• The method of re-sampling uses
– experimental methods, rather than analytical methods, to generate the unique
sampling distribution.
• The method of re-sampling yields
– unbiased estimates as it is based on the unbiased samples of all the possible
results of the data studied by the researcher.
76
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
The re-sampling method frees researchers from two limitations of conventional statistics:
“the assumption that the data conform to a bell-shaped curve and the need to focus on statistical
measures whose theoretical properties can be analyzed mathematically.”
Diaconis, P., and B. Efron. (1983). Computer-intensive methods in statistics. Scientific
American, May, 116-130.
1. Permutation
2. Bootstrap
3. Jackknife
4. Cross validation
77
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
1. Permutation
Permutation Origin
Re-sampling procedures date back to 1930s, when permutation tests were introduced by R.A.
Fisher and E.J.G. Pitman.
They were not feasible until the computer era.
Permutation solution
• Make a deck of eight cards, four marked "T" and four marked "M.“
• Deal out these eight cards successively in all possible orderings (permutations)
• Record how many of those permutations show >= 6 matches.
78
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Approximate Permutation
• Shuffle the deck and
• deal it out along the strip of paper with the marked guesses, record the number of
matches.
• Repeat many times.
Compute “different statistic” , save result in table and repeat resampling process 1000+
iterations.
Permutation Tests
In classical hypothesis testing,
we start with assumptions about the underlying distribution and
then derive the sampling distribution of the test statistic under H0.
In Permutation testing,
the initial assumptions are not needed (except exchangeability), and
the sampling distribution of the test statistic under H0 is computed by using
permutations of the data.
79
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
• The Permutation test is a technique that bases inference on “experiments” within the
observed dataset.
• Consider the following example:
• In a medical experiment, rats are randomly assigned to a treatment (Tx) or control (C)
group.
• The outcome Xi is measured in the ith rat.
• Under H0,
• the outcome does not depend on whether a rat carries the label Tx or C.
• Under H1,
• the outcome tends to different, say larger for rats labeled Tx.
• A test statistic T measures
• the difference in observed outcomes for the two groups.
• T may be the difference in the two group means (or medians), denoted as t for the
observed data.
• Under H0,
• the individual labels of Tx and C are unimportant, since they have no impact on
the outcome. Since they are unimportant, the label can be randomly shuffled
among the rats without changing the joint null distribution of the data.
• Shuffling the data creates a:
• “new” dataset.
• It has the same rats, but with the group labels changed so as to appear as there
were different group assignments.
• Let t be the value of the test statistic from the original dataset.
• Let t1 be the value of the test statistic computed from a one dataset with permuted labels.
• Consider all M possible permutations of the labels, obtaining the test statistics,
t1, …, tM.
• Under H0, t1, …, tM are all generated from the same underlying distribution that
generated t.
• Thus, t can be compared to the permuted data test statistics, t1, …, tM , to test the
hypothesis and obtain a p-value or to construct confidence limits for the statistic.
• Survival times
• Treated mice 94, 38, 23, 197, 99, 16, 141
• Mean: 86.8
80
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
• Untreated mice 52, 10, 40, 104, 51, 27, 146, 30, 46
• Mean: 56.2
(Efron & Tibshirani)
Calculate the difference between the means of the two observed samples – it’s 30.6 days
in favor of the treated mice.
Consider the two samples combined (16 observations) as the relevant universe to
resample from.
Draw 7 hypothetical observations and designate them "Treatment"; draw 9 hypothetical
observations and designate them "Control".
Compute and record the difference between the means of the two samples.
Repeat steps 3 and 4 perhaps 1000 times.
Determine how often the resampled difference exceeds the observed difference of 30.6
If the group means are truly equal,
then shifting the group labels will not have a big impact the sum of the two groups (or
mean with equal sample sizes).
Some group sums will be larger than in the original data set and some will be smaller.
2. Bootstrap
• The bootstrap is
– a widely applicable tool that
– can be used to quantify the uncertainty associated with a given estimator or
statistical learning approach, including those for which it is difficult to obtain
a measure of variability.
• The bootstrap generates:
– distinct data sets by repeatedly sampling observations from the original data set.
– These generated data sets can be used to estimate variability in lieu of sampling
independent data sets from the full population.
81
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
• 1969 Simon publishes the bootstrap as an example in Basic Research Methods in Social
Science (the earlier pigfood example)
• 1979 Efron names and publishes first paper on the bootstrap
• Coincides with advent of personal computer.
The bootstrap procedure is a means of estimating the statistical accuracy . . . from the
data in a single sample.
Bootstrapping is used to mimic the process of selecting many samples when the
population is too small to do otherwise
The samples are generated from the data in the original sample by copying it many
number of times (Monte Carlo Simulation)
82
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Samples can then selected at random and descriptive statistics calculated or regressions
run for each sample
The results generated from the bootstrap samples can be treated as if it they were the
result of actual sampling from the original population
Characteristics of Bootstrapping
Bootstrapping Example
83
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Bootstrapping is especially useful in situations when no analytic formula for the sampling
distribution is available.
• Traditional forecasting methods, like exponential smoothing, work well when demand is
constant – patterns easily recognized by software
• In contrast, when demand is irregular, patterns may be difficult to recognize.
• Therefore, when faced with irregular demand, bootstrapping may be used to provide
more accurate forecasts, making some important assumptions…
84
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Bootstrap Types
a) Parametric Bootstrap
b) Non-parametric Bootstrap
a) Parametric Bootstrap
• Re-sampling makes no assumptions about the population distribution.
• The bootstrap covered thus far is a nonparametric bootstrap.
• If we have information about the population distr., this can be used in resampling.
• In this case, when we draw randomly from the sample we can use population distr.
• For example, if we know that the population distr. is normal then estimate its parameters
using the sample mean and variance.
• Then approximate the population distr. with the sample distr. and use it to draw new
samples.
• As expected, if the assumption about population distribution is correct then the
parametric bootstrap will perform better than the nonparametric bootstrap.
• If not correct, then the nonparametric bootstrap will perform better.
Bootstrap Example
• A new pigfood ration is tested on twelve pigs, with six-week weight gains as follows:
• 496 544 464 416 512 560 608 544 480 466 512 496
• Mean: 508 ounces (establish a confidence interval)
Draw simulated samples from a hypothetical universe that embodies all we know about the
universe that this sample came from – our sample, replicated an infinite number of times.
The Bootstrap process steps
1. Put the observed weight gains in a hat
2. Sample 12 with replacement
3. Record the mean
4. Repeat steps 2-3, say, 1000 times
5. Record the 5th and 95th percentiles (for a 90% confidence interval)
85
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
b) Nonparametric bootstrap
nonparametric bootstrap method which relies on the empirical distribution function.
The idea of the nonparametric bootstrap is to simulate data from the empirical cdf Fn.
Since the bootstrap samples are generated from Fn, this method is called the
nonparametric bootstrap.
Here Fn is a discrete probability distribution that gives probability 1/n to each
observed value x1, · · · , xn.
A sample of size n from Fn is thus a sample of size n drawn with replacement from
the collection x1, · · · , xn.
The standard deviation of ˆθ is then estimated by
sθˆ = SQRT( 1 B X B i=1 (θ ∗ i − ¯θ ∗)^ 2 )
where θ ∗ 1 , . . . , θ∗ B are produced from B sample of size n from the collection x1, ·
· · , xn.
3. Jackknife Method
• Jackknife method was introduced by Quenouille (1949)
– to estimate the bias of an estimator.
• The method is later shown to be useful in reducing the bias as well as in estimating the
variance of an estimator.
86
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
• Let ˆθn be an estimator of θ based on n i.i.d. random vectors X1, . . . , Xn, i.e., ˆθn =
fn(X1, . . . , Xn), for some function fn. Let
• A statistical method for estimating and removing bias* and for deriving robust estimates
of standard errors and confidence intervals.
• Created by systematically dropping out subsets of data one at a time and assessing the
resulting variation.
• Such a bias corrected estimator hopefully reduces the over all bias.
• The summands above θn,i = ˆθn − (n − 1)ˆθn,−i , i = 1, . . . , n are called pseudo-values.
• Jackknife
– Less general technique
– Explores sample variation differently
– Yields the same result each time
– Similar data requirements
4. Cross validation
• Cross-validation is
– a technique used to protect against overfitting in a predictive model,
– particularly in a case where the amount of data may be limited.
87
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
• In cross-validation, you make a fixed number of folds (or partitions) of the data, run the
analysis on each fold, and then average the overall error estimate.
• Cross-Validation
– Not a resampling technique
– Requires large amounts of data
– Extremely useful in data mining and artificial intelligence
88
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
1. holdout method
• K-fold cross validation is one way to improve over the holdout method.
– The data set is divided into k subsets, and the holdout method is repeated k times.
• Each time, one of the k subsets is used as
– the test set and
– the other k-1 subsets are put together to form a training set.
– Then the average error across all k trials is computed.
• The advantage of this method is that
– it matters less how the data gets divided.
• Every data point gets to be in a test set exactly once, and gets to be in a training set k-
1 times.
• The variance of the resulting estimate is reduced as k is increased.
89
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
• The disadvantage of this method is that the training algorithm has to be rerun from
scratch k times, which means it takes k times as much computation to make an
evaluation.
• A variant of this method is to randomly divide the data into a test and training
set kdifferent times.
• The advantage of doing this is that
– you can independently choose how large each test set is and how many trials you
average over.
************
90
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
2) Hypothesis Testing
Statistical Inference
91
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Use a statistical approach to make an inference about the distribution of a sample of data
we collect.
The population or macroscopic phenomenon is always unknown itself, because some, but
not all, of the data of our interest can be taken.
There are Two most common types of Statistical Inference and they are:
1. Confidence intervals and
2. Tests of significance.
1. Confidence Intervals
92
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Example
• Compute 95% C.I.
• IQ scores
– s = 15
• Sample: 114, 118, 122, 126
– SXi = 480, X = 120, sX = 7.5
– 120 ± 1.96(7.5)
– 120 + 14.7
– 105.3 < m < 134.7
93
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
• We are 95% confident that population means lies between 105.3 and 134.7 ~
When s Is Unknown?
• Usually do not know s
• Use different formula
• “Best”(unbiased) point-estimator of s = s
– standard error of mean for sample
s
sX
n
• Cannot use z distribution
– 2 uncertain values: m and s
– need wider interval to be confident
• Student’s t distribution
– also normal distribution
– width depends on how well s approximates s ~
94
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Student’s t Distribution
• if s = s, then t and z identical
– if s ¹ s, then t wider
• Accuracy of s as point-estimate
– depends on sample size
– larger n ---> more accurate
• n > 120
– s»s
– t and z distributions almost identical ~
Degrees of Freedom
• Width of t depends on n
• Degrees of Freedom
– related to sample size
– larger sample ---> better estimate
– n - 1 to compute s ~
Critical Values of t
• Table A.2: “Critical Values of t”
• df = n - 1
• level of significance for two-tailed test
– a
– area in both tails for critical value
• level of confidence for CI ~
– 1-a ~
95
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
96
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
• It is intended to help researchers differentiate between real and random patterns in the
data.
What is a Hypothesis?
• A hypothesis is an assumption about the population parameter.
– A parameter is a Population mean or proportion
– The parameter must be identified before analysis.
Hypothesis Testing
• Is also called significance testing
• Tests a claim about a parameter using evidence (data in a sample
• The technique is introduced by considering a one-sample z test
• The procedure is broken into four steps
• Each element of the procedure must be understood
97
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Sampling Distribution :
98
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Level of Significance, a
• Defines Unlikely Values of Sample Statistic if Null Hypothesis Is True
– Called Rejection Region of Sampling
Distribution
• Designated a (alpha)
– Typical values are 0.01, 0.05, 0.10
• Selected by the Researcher at the Start
• Provides the Critical Value(s) of the Test
Test the Assumption that the true mean SBP of participants is 120 mmHg.
State H0 H0 : m = 120
State H1 H1 : m 120
Choose a a = 0.05
Choose n n = 100
Choose Test: Z, t, X2 Test (or p Value)
99
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Example 2:
Decide whether or not the result is statistically significant based on the p-value
100
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Using a = 0.05 as the level of significance criterion, the results are statistically significant
because 0.029 is less than 0.05. In other words, we can reject the null hypothesis.
Example 2:
• In a survey of diabetics in a large city, it was found that 100 out of 400 have
diabetic foot. Can we conclude that 20 percent of diabetics in the sampled
population have diabetic foot.
• Test at the a =0.05 significance level.
Solution
Decision:
We have sufficient evidence to reject the Ho value of 20%
We conclude that in the population of diabetic the proportion who have diabetic foot does
not equal 0.20
****************
101
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
Errors are an inescapable element of predictive analytics that should also be quantified
and presented along with any model, often in the form of a confidence interval that
indicates how accurate its predictions are expected to be.
Analysis of prediction errors from similar or previous models can help determine
confidence intervals.
In reinforcement learning, for example, an agent might use the goal of minimizing error
feedback as a way to improve.
Prediction errors, in that case, might be assigned a negative value and predicted
outcomes a positive value, in which case the AI would be programmed to attempt to
maximize its score.
That approach to ML, sometimes known as error-driven learning, seeks to stimulate
learning by approximating the human drive for mastery.
The standard error of the estimate is closely related to this quantity and is defined below:
where σest is the standard error of the estimate, Y is an actual score, Y' is a predicted score, and
N is the number of pairs of scores.
In statistics, the mean squared error (MSE) or mean squared deviation (MSD) of
an estimator (of a procedure for estimating an unobserved quantity) measures
the average of the squares of the errors—that is, the average squared difference between
the estimated values and what is estimated.
MSE is a risk function, corresponding to the expected value of the squared error loss.
103
MC5502 – BDA UNIT - I : INTRODUCTION TO BIG DATA
The fact that MSE is almost always strictly positive (and not zero) is because
of randomness or because the estimator does not account for information that could
produce a more accurate estimate.
Thus, the prediction error influence the analytics functionalities and its
applications areas.
******************
105