SlideShare a Scribd company logo
1 of 1
Download to read offline
Integral I:
Estimator for I:
where f(x) = 20 - x^2 and p(x) ~ U[a,b]
Create a Python function for I-Antithetic
def montecarlo_antithetic (f: Callable [[float], [float]], a: float, b: float, n:int):
returnInAntithetic=n/21i=1n/221(p(xi)f(xi)+p(x^i)f(x^i))(InAntithetic,Var(InAntithetic))p(x)={b
a1,0,x[a,b]otherwiseI=abf(x)dx

More Related Content

More from fantasiatheoutofthef

JAVA OOP project; desperately need help asap im begging.Been stuck.pdf
JAVA OOP project; desperately need help asap im begging.Been stuck.pdfJAVA OOP project; desperately need help asap im begging.Been stuck.pdf
JAVA OOP project; desperately need help asap im begging.Been stuck.pdf
fantasiatheoutofthef
 
In this case study, we will explore the exercise of power in leaders.pdf
In this case study, we will explore the exercise of power in leaders.pdfIn this case study, we will explore the exercise of power in leaders.pdf
In this case study, we will explore the exercise of power in leaders.pdf
fantasiatheoutofthef
 
Ive already completed the Java assignment below, but it doesnt wor.pdf
Ive already completed the Java assignment below, but it doesnt wor.pdfIve already completed the Java assignment below, but it doesnt wor.pdf
Ive already completed the Java assignment below, but it doesnt wor.pdf
fantasiatheoutofthef
 
In this assignment you will implement insert() method for a singly l.pdf
In this assignment you will implement insert() method for a singly l.pdfIn this assignment you will implement insert() method for a singly l.pdf
In this assignment you will implement insert() method for a singly l.pdf
fantasiatheoutofthef
 
Introduction Pervasive computing demands the all-encompassing exploita.pdf
Introduction Pervasive computing demands the all-encompassing exploita.pdfIntroduction Pervasive computing demands the all-encompassing exploita.pdf
Introduction Pervasive computing demands the all-encompassing exploita.pdf
fantasiatheoutofthef
 
Lecture Activity 7.1 Evaluating Evidence on Wikipedia Scenario You.pdf
Lecture Activity 7.1 Evaluating Evidence on Wikipedia Scenario You.pdfLecture Activity 7.1 Evaluating Evidence on Wikipedia Scenario You.pdf
Lecture Activity 7.1 Evaluating Evidence on Wikipedia Scenario You.pdf
fantasiatheoutofthef
 
LabProgram.javaimport java.util.NoSuchElementException;public .pdf
LabProgram.javaimport java.util.NoSuchElementException;public .pdfLabProgram.javaimport java.util.NoSuchElementException;public .pdf
LabProgram.javaimport java.util.NoSuchElementException;public .pdf
fantasiatheoutofthef
 

More from fantasiatheoutofthef (17)

Instructions Create an Android app according to the requirements below.pdf
Instructions Create an Android app according to the requirements below.pdfInstructions Create an Android app according to the requirements below.pdf
Instructions Create an Android app according to the requirements below.pdf
 
JAVA OOP project; desperately need help asap im begging.Been stuck.pdf
JAVA OOP project; desperately need help asap im begging.Been stuck.pdfJAVA OOP project; desperately need help asap im begging.Been stuck.pdf
JAVA OOP project; desperately need help asap im begging.Been stuck.pdf
 
In this case study, we will explore the exercise of power in leaders.pdf
In this case study, we will explore the exercise of power in leaders.pdfIn this case study, we will explore the exercise of power in leaders.pdf
In this case study, we will explore the exercise of power in leaders.pdf
 
James Santelli was staying at a motel owned by Abu Rahmatullah for s.pdf
James Santelli was staying at a motel owned by Abu Rahmatullah for s.pdfJames Santelli was staying at a motel owned by Abu Rahmatullah for s.pdf
James Santelli was staying at a motel owned by Abu Rahmatullah for s.pdf
 
Ive already completed the Java assignment below, but it doesnt wor.pdf
Ive already completed the Java assignment below, but it doesnt wor.pdfIve already completed the Java assignment below, but it doesnt wor.pdf
Ive already completed the Java assignment below, but it doesnt wor.pdf
 
In this assignment you will implement insert() method for a singly l.pdf
In this assignment you will implement insert() method for a singly l.pdfIn this assignment you will implement insert() method for a singly l.pdf
In this assignment you will implement insert() method for a singly l.pdf
 
Introduction Pervasive computing demands the all-encompassing exploita.pdf
Introduction Pervasive computing demands the all-encompassing exploita.pdfIntroduction Pervasive computing demands the all-encompassing exploita.pdf
Introduction Pervasive computing demands the all-encompassing exploita.pdf
 
Introduction (1 Mark)Body (7 Marks)1-Definition of Technolog.pdf
Introduction (1 Mark)Body (7 Marks)1-Definition of Technolog.pdfIntroduction (1 Mark)Body (7 Marks)1-Definition of Technolog.pdf
Introduction (1 Mark)Body (7 Marks)1-Definition of Technolog.pdf
 
Indicate and provide a brief explanation for whether the following i.pdf
Indicate and provide a brief explanation for whether the following i.pdfIndicate and provide a brief explanation for whether the following i.pdf
Indicate and provide a brief explanation for whether the following i.pdf
 
Lindsay was leaving a local department store when an armed security .pdf
Lindsay was leaving a local department store when an armed security .pdfLindsay was leaving a local department store when an armed security .pdf
Lindsay was leaving a local department store when an armed security .pdf
 
Learning Team � Ethical Challenges Worksheet Your team of internat.pdf
Learning Team � Ethical Challenges Worksheet Your team of internat.pdfLearning Team � Ethical Challenges Worksheet Your team of internat.pdf
Learning Team � Ethical Challenges Worksheet Your team of internat.pdf
 
Lecture Activity 7.1 Evaluating Evidence on Wikipedia Scenario You.pdf
Lecture Activity 7.1 Evaluating Evidence on Wikipedia Scenario You.pdfLecture Activity 7.1 Evaluating Evidence on Wikipedia Scenario You.pdf
Lecture Activity 7.1 Evaluating Evidence on Wikipedia Scenario You.pdf
 
Janie graduates from high school in 2022 and enrolls in college in t.pdf
Janie graduates from high school in 2022 and enrolls in college in t.pdfJanie graduates from high school in 2022 and enrolls in college in t.pdf
Janie graduates from high school in 2022 and enrolls in college in t.pdf
 
Janice was given a piggy bank on her seventh birthday, and she put it .pdf
Janice was given a piggy bank on her seventh birthday, and she put it .pdfJanice was given a piggy bank on her seventh birthday, and she put it .pdf
Janice was given a piggy bank on her seventh birthday, and she put it .pdf
 
LabProgram.javaimport java.util.NoSuchElementException;public .pdf
LabProgram.javaimport java.util.NoSuchElementException;public .pdfLabProgram.javaimport java.util.NoSuchElementException;public .pdf
LabProgram.javaimport java.util.NoSuchElementException;public .pdf
 
Ken and Charlotte Maschmeier were the majority shareholders of South.pdf
Ken and Charlotte Maschmeier were the majority shareholders of South.pdfKen and Charlotte Maschmeier were the majority shareholders of South.pdf
Ken and Charlotte Maschmeier were the majority shareholders of South.pdf
 
iPad 613 PM Aownload1588.mediafire.com Orbital Communications, Inc..pdf
iPad  613 PM Aownload1588.mediafire.com Orbital Communications, Inc..pdfiPad  613 PM Aownload1588.mediafire.com Orbital Communications, Inc..pdf
iPad 613 PM Aownload1588.mediafire.com Orbital Communications, Inc..pdf
 

Recently uploaded

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
negromaestrong
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 

Recently uploaded (20)

Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 

Integral IEstimator for Iwhere f(x) = 20 - x^2 and p(x) ~ U[a,.pdf

  • 1. Integral I: Estimator for I: where f(x) = 20 - x^2 and p(x) ~ U[a,b] Create a Python function for I-Antithetic def montecarlo_antithetic (f: Callable [[float], [float]], a: float, b: float, n:int): returnInAntithetic=n/21i=1n/221(p(xi)f(xi)+p(x^i)f(x^i))(InAntithetic,Var(InAntithetic))p(x)={b a1,0,x[a,b]otherwiseI=abf(x)dx