SlideShare a Scribd company logo
1 of 2
Confidence interval is an interval computed using sample information that estimates the
value of a population parameter. Thus the primary use of a confidence interval is to
estimate a true, unknown population parameter.
Bootstrap is an alternative for obtaining confidence intervals for the mean using the non
parametric approach. The variables in the data are almost all not normally distributed,
therefore we need bootstrap in R to do it.
The idea is as follows:
1. Resample with replacement B times.
2. For each of these samples calculate the sample mean.
3. Calculate an appropriate bootstrap confidence interval.
Thisis the program to runthe bootstrapinR
library(boot)
Bmean<- function(data,indices){
d <- data[indices]
return(mean(d))
}
results<- boot(data=data0,statistic=Bmean,R=1000)
boot.ci(results,type=c("norm","basic","perc","bca"))
Normal Distribution Confidence Interval
The variabel that is normally distributed is only GPA. Therefore we can
perform confidence interval with parametric approach which means without
using bootstrap.By using 5% significance level,
We take 1 − α = 0.95, So we have:
𝑃(−𝑧 ≤ 𝑍 ≤ 𝑧) = 1 − 𝛼 = 0.95
so, we have
Φ( 𝑧) = 𝑃( 𝑍 ≤ 𝑧) = 1 −
𝛼
2
= 0.975
𝑧 = Φ−1
(Φ(z)) = Φ−1(0.975) = 1.96
So, to obtain the confidence interval
0.95 = 1 − 𝛼 = 𝑃(−𝑧 ≤ 𝑍 ≤ 𝑧) = 𝑃(−1.96 ≤
𝑋̅ − 𝜇
𝜎
𝑛⁄
≤ 1.96
= 𝑃(𝑋̅ − 1.96
𝜎
√ 𝑛
≤ 𝜇 ≤ 𝑋̅ + 1.96
𝜎
√ 𝑛
error <- qnorm(0.975)*s/sqrt(n)
left <- a-error
right <- a+error
> left
[1] 3.035062
> right
[1] 3.222938
The confidence Interval for GPA is 3.035062 and 3.222938
GPA
Min. :2.300
1st Qu.:2.900
Median :3.150
Mean :3.129
3rd Qu.:3.400
Max. :3.900
stdev = 0.3773884
samplesize = 62

More Related Content

What's hot

Validation and Over fitting , Validation strategies
Validation and Over fitting , Validation strategiesValidation and Over fitting , Validation strategies
Validation and Over fitting , Validation strategiesChode Amarnath
 
Supervised and unsupervised learning
Supervised and unsupervised learningSupervised and unsupervised learning
Supervised and unsupervised learningAmAn Singh
 
Data Trend Analysis by Assigning Polynomial Function For Given Data Set
Data Trend Analysis by Assigning Polynomial Function For Given Data SetData Trend Analysis by Assigning Polynomial Function For Given Data Set
Data Trend Analysis by Assigning Polynomial Function For Given Data SetIJCERT
 
Combining inductive and analytical learning
Combining inductive and analytical learningCombining inductive and analytical learning
Combining inductive and analytical learningswapnac12
 
Convolutional Neural Network for Text Classification
Convolutional Neural Network for Text ClassificationConvolutional Neural Network for Text Classification
Convolutional Neural Network for Text ClassificationAnaïs Addad
 
Machine Learning Decision Tree Algorithms
Machine Learning Decision Tree AlgorithmsMachine Learning Decision Tree Algorithms
Machine Learning Decision Tree AlgorithmsRupak Roy
 
Building Azure Machine Learning Models
Building Azure Machine Learning ModelsBuilding Azure Machine Learning Models
Building Azure Machine Learning ModelsEng Teong Cheah
 
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...Sri Ambati
 
Accelerating the Random Forest algorithm for commodity parallel- Mark Seligman
Accelerating the Random Forest algorithm for commodity parallel- Mark SeligmanAccelerating the Random Forest algorithm for commodity parallel- Mark Seligman
Accelerating the Random Forest algorithm for commodity parallel- Mark SeligmanPyData
 
Machine Learning Algorithm - KNN
Machine Learning Algorithm - KNNMachine Learning Algorithm - KNN
Machine Learning Algorithm - KNNKush Kulshrestha
 
Text Analytics
Text AnalyticsText Analytics
Text AnalyticsAjay Ram
 
Predicting house prices_Regression
Predicting house prices_RegressionPredicting house prices_Regression
Predicting house prices_RegressionSruti Jain
 
Random forest algorithm for regression a beginner's guide
Random forest algorithm for regression   a beginner's guideRandom forest algorithm for regression   a beginner's guide
Random forest algorithm for regression a beginner's guideprateek kumar
 

What's hot (20)

Validation and Over fitting , Validation strategies
Validation and Over fitting , Validation strategiesValidation and Over fitting , Validation strategies
Validation and Over fitting , Validation strategies
 
Supervised and unsupervised learning
Supervised and unsupervised learningSupervised and unsupervised learning
Supervised and unsupervised learning
 
Data Trend Analysis by Assigning Polynomial Function For Given Data Set
Data Trend Analysis by Assigning Polynomial Function For Given Data SetData Trend Analysis by Assigning Polynomial Function For Given Data Set
Data Trend Analysis by Assigning Polynomial Function For Given Data Set
 
AI: Belief Networks
AI: Belief NetworksAI: Belief Networks
AI: Belief Networks
 
Nlp text classification
Nlp text classificationNlp text classification
Nlp text classification
 
Combining inductive and analytical learning
Combining inductive and analytical learningCombining inductive and analytical learning
Combining inductive and analytical learning
 
Learning
LearningLearning
Learning
 
Convolutional Neural Network for Text Classification
Convolutional Neural Network for Text ClassificationConvolutional Neural Network for Text Classification
Convolutional Neural Network for Text Classification
 
Machine Learning Decision Tree Algorithms
Machine Learning Decision Tree AlgorithmsMachine Learning Decision Tree Algorithms
Machine Learning Decision Tree Algorithms
 
Building Azure Machine Learning Models
Building Azure Machine Learning ModelsBuilding Azure Machine Learning Models
Building Azure Machine Learning Models
 
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...
Interpretable Machine Learning Using LIME Framework - Kasia Kulma (PhD), Data...
 
Hierarchical clustering
Hierarchical clusteringHierarchical clustering
Hierarchical clustering
 
Accelerating the Random Forest algorithm for commodity parallel- Mark Seligman
Accelerating the Random Forest algorithm for commodity parallel- Mark SeligmanAccelerating the Random Forest algorithm for commodity parallel- Mark Seligman
Accelerating the Random Forest algorithm for commodity parallel- Mark Seligman
 
Machine Learning Algorithm - KNN
Machine Learning Algorithm - KNNMachine Learning Algorithm - KNN
Machine Learning Algorithm - KNN
 
Text Analytics
Text AnalyticsText Analytics
Text Analytics
 
Predicting house prices_Regression
Predicting house prices_RegressionPredicting house prices_Regression
Predicting house prices_Regression
 
Random forest algorithm for regression a beginner's guide
Random forest algorithm for regression   a beginner's guideRandom forest algorithm for regression   a beginner's guide
Random forest algorithm for regression a beginner's guide
 
Overfitting and-tbl
Overfitting and-tblOverfitting and-tbl
Overfitting and-tbl
 
Preparing Data
Preparing DataPreparing Data
Preparing Data
 
Machine Learning 1
Machine Learning 1Machine Learning 1
Machine Learning 1
 

Viewers also liked

Viewers also liked (8)

Topic
TopicTopic
Topic
 
PRBE002 final assignment(5)
PRBE002 final assignment(5)PRBE002 final assignment(5)
PRBE002 final assignment(5)
 
answer
answeranswer
answer
 
Answer
AnswerAnswer
Answer
 
ANSWERS
ANSWERSANSWERS
ANSWERS
 
Assignment_01_F2015 stats
Assignment_01_F2015 statsAssignment_01_F2015 stats
Assignment_01_F2015 stats
 
MoreCheating(1)
MoreCheating(1)MoreCheating(1)
MoreCheating(1)
 
Final Case study answer
Final Case study answerFinal Case study answer
Final Case study answer
 

Similar to leslie

Point and Interval Estimation
Point and Interval EstimationPoint and Interval Estimation
Point and Interval EstimationShubham Mehta
 
PROGRAM TEST DATA GENERATION FOR BRANCH COVERAGE WITH GENETIC ALGORITHM: COMP...
PROGRAM TEST DATA GENERATION FOR BRANCH COVERAGE WITH GENETIC ALGORITHM: COMP...PROGRAM TEST DATA GENERATION FOR BRANCH COVERAGE WITH GENETIC ALGORITHM: COMP...
PROGRAM TEST DATA GENERATION FOR BRANCH COVERAGE WITH GENETIC ALGORITHM: COMP...cscpconf
 
WEKA: Credibility Evaluating Whats Been Learned
WEKA: Credibility Evaluating Whats Been LearnedWEKA: Credibility Evaluating Whats Been Learned
WEKA: Credibility Evaluating Whats Been LearnedDataminingTools Inc
 
WEKA:Credibility Evaluating Whats Been Learned
WEKA:Credibility Evaluating Whats Been LearnedWEKA:Credibility Evaluating Whats Been Learned
WEKA:Credibility Evaluating Whats Been Learnedweka Content
 
Lecture 5: Interval Estimation
Lecture 5: Interval Estimation Lecture 5: Interval Estimation
Lecture 5: Interval Estimation Marina Santini
 
statistical inference
statistical inference statistical inference
statistical inference BasitShah18
 
PERFORMANCE_PREDICTION__PARAMETERS[1].pptx
PERFORMANCE_PREDICTION__PARAMETERS[1].pptxPERFORMANCE_PREDICTION__PARAMETERS[1].pptx
PERFORMANCE_PREDICTION__PARAMETERS[1].pptxTAHIRZAMAN81
 
All PERFORMANCE PREDICTION PARAMETERS.pptx
All PERFORMANCE PREDICTION  PARAMETERS.pptxAll PERFORMANCE PREDICTION  PARAMETERS.pptx
All PERFORMANCE PREDICTION PARAMETERS.pptxtaherzamanrather
 
Insurance Optimization
Insurance OptimizationInsurance Optimization
Insurance OptimizationAlbert Chu
 
CABT SHS Statistics & Probability - Estimation of Parameters (intro)
CABT SHS Statistics & Probability -  Estimation of Parameters (intro)CABT SHS Statistics & Probability -  Estimation of Parameters (intro)
CABT SHS Statistics & Probability - Estimation of Parameters (intro)Gilbert Joseph Abueg
 
Random Forest / Bootstrap Aggregation
Random Forest / Bootstrap AggregationRandom Forest / Bootstrap Aggregation
Random Forest / Bootstrap AggregationRupak Roy
 
Predict Backorder on a supply chain data for an Organization
Predict Backorder on a supply chain data for an OrganizationPredict Backorder on a supply chain data for an Organization
Predict Backorder on a supply chain data for an OrganizationPiyush Srivastava
 
Neural basics
Neural basicsNeural basics
Neural basicscoursesub
 
Predictive Modeling Workshop
Predictive Modeling WorkshopPredictive Modeling Workshop
Predictive Modeling Workshopodsc
 
Statistical Parameters , Estimation , Confidence region.pptx
Statistical Parameters , Estimation , Confidence region.pptxStatistical Parameters , Estimation , Confidence region.pptx
Statistical Parameters , Estimation , Confidence region.pptxPawanDhamala1
 

Similar to leslie (20)

Point and Interval Estimation
Point and Interval EstimationPoint and Interval Estimation
Point and Interval Estimation
 
PROGRAM TEST DATA GENERATION FOR BRANCH COVERAGE WITH GENETIC ALGORITHM: COMP...
PROGRAM TEST DATA GENERATION FOR BRANCH COVERAGE WITH GENETIC ALGORITHM: COMP...PROGRAM TEST DATA GENERATION FOR BRANCH COVERAGE WITH GENETIC ALGORITHM: COMP...
PROGRAM TEST DATA GENERATION FOR BRANCH COVERAGE WITH GENETIC ALGORITHM: COMP...
 
WEKA: Credibility Evaluating Whats Been Learned
WEKA: Credibility Evaluating Whats Been LearnedWEKA: Credibility Evaluating Whats Been Learned
WEKA: Credibility Evaluating Whats Been Learned
 
WEKA:Credibility Evaluating Whats Been Learned
WEKA:Credibility Evaluating Whats Been LearnedWEKA:Credibility Evaluating Whats Been Learned
WEKA:Credibility Evaluating Whats Been Learned
 
Lecture 5: Interval Estimation
Lecture 5: Interval Estimation Lecture 5: Interval Estimation
Lecture 5: Interval Estimation
 
Chapter09
Chapter09Chapter09
Chapter09
 
Stats chapter 10
Stats chapter 10Stats chapter 10
Stats chapter 10
 
statistical inference
statistical inference statistical inference
statistical inference
 
Chapter 8
Chapter 8Chapter 8
Chapter 8
 
PERFORMANCE_PREDICTION__PARAMETERS[1].pptx
PERFORMANCE_PREDICTION__PARAMETERS[1].pptxPERFORMANCE_PREDICTION__PARAMETERS[1].pptx
PERFORMANCE_PREDICTION__PARAMETERS[1].pptx
 
All PERFORMANCE PREDICTION PARAMETERS.pptx
All PERFORMANCE PREDICTION  PARAMETERS.pptxAll PERFORMANCE PREDICTION  PARAMETERS.pptx
All PERFORMANCE PREDICTION PARAMETERS.pptx
 
Insurance Optimization
Insurance OptimizationInsurance Optimization
Insurance Optimization
 
CABT SHS Statistics & Probability - Estimation of Parameters (intro)
CABT SHS Statistics & Probability -  Estimation of Parameters (intro)CABT SHS Statistics & Probability -  Estimation of Parameters (intro)
CABT SHS Statistics & Probability - Estimation of Parameters (intro)
 
Random Forest / Bootstrap Aggregation
Random Forest / Bootstrap AggregationRandom Forest / Bootstrap Aggregation
Random Forest / Bootstrap Aggregation
 
Predict Backorder on a supply chain data for an Organization
Predict Backorder on a supply chain data for an OrganizationPredict Backorder on a supply chain data for an Organization
Predict Backorder on a supply chain data for an Organization
 
Neural basics
Neural basicsNeural basics
Neural basics
 
Predictive Modeling Workshop
Predictive Modeling WorkshopPredictive Modeling Workshop
Predictive Modeling Workshop
 
Statistical Parameters , Estimation , Confidence region.pptx
Statistical Parameters , Estimation , Confidence region.pptxStatistical Parameters , Estimation , Confidence region.pptx
Statistical Parameters , Estimation , Confidence region.pptx
 
working with python
working with pythonworking with python
working with python
 
Estimating a Population Proportion
Estimating a Population ProportionEstimating a Population Proportion
Estimating a Population Proportion
 

leslie

  • 1. Confidence interval is an interval computed using sample information that estimates the value of a population parameter. Thus the primary use of a confidence interval is to estimate a true, unknown population parameter. Bootstrap is an alternative for obtaining confidence intervals for the mean using the non parametric approach. The variables in the data are almost all not normally distributed, therefore we need bootstrap in R to do it. The idea is as follows: 1. Resample with replacement B times. 2. For each of these samples calculate the sample mean. 3. Calculate an appropriate bootstrap confidence interval. Thisis the program to runthe bootstrapinR library(boot) Bmean<- function(data,indices){ d <- data[indices] return(mean(d)) } results<- boot(data=data0,statistic=Bmean,R=1000) boot.ci(results,type=c("norm","basic","perc","bca"))
  • 2. Normal Distribution Confidence Interval The variabel that is normally distributed is only GPA. Therefore we can perform confidence interval with parametric approach which means without using bootstrap.By using 5% significance level, We take 1 − α = 0.95, So we have: 𝑃(−𝑧 ≤ 𝑍 ≤ 𝑧) = 1 − 𝛼 = 0.95 so, we have Φ( 𝑧) = 𝑃( 𝑍 ≤ 𝑧) = 1 − 𝛼 2 = 0.975 𝑧 = Φ−1 (Φ(z)) = Φ−1(0.975) = 1.96 So, to obtain the confidence interval 0.95 = 1 − 𝛼 = 𝑃(−𝑧 ≤ 𝑍 ≤ 𝑧) = 𝑃(−1.96 ≤ 𝑋̅ − 𝜇 𝜎 𝑛⁄ ≤ 1.96 = 𝑃(𝑋̅ − 1.96 𝜎 √ 𝑛 ≤ 𝜇 ≤ 𝑋̅ + 1.96 𝜎 √ 𝑛 error <- qnorm(0.975)*s/sqrt(n) left <- a-error right <- a+error > left [1] 3.035062 > right [1] 3.222938 The confidence Interval for GPA is 3.035062 and 3.222938 GPA Min. :2.300 1st Qu.:2.900 Median :3.150 Mean :3.129 3rd Qu.:3.400 Max. :3.900 stdev = 0.3773884 samplesize = 62