Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

There is a set of extremely useful functions, used in performing statistical calculations. The values for these functions have historically been placed in tables, in

image text in transcribed

There is a set of extremely useful functions, used in performing statistical calculations. The values for these functions have historically been placed in tables, in the Appendix of textbooks. The first unction is called the Normal function, and is defined as 0.4 0.3 Norm(x) 0.2 Norm(x) = -e -2 0 2 The second function is the Cumulative Normal function (cumulative meaning to add or integrate) given by the following equation s can be ated using r SIMPSON 0.8 CumNorm(xval) Norm(x) dx CumNorm(x) unction 0.4 0.2 = infinity Table A re -2 0 2 Finaly, there is the Inverse of the Cumulative Normal function which is defined by the following process (not a simple equation) InvCumNorm(givenValue) reysziq Table requires that we search for and return a value of xval that causes the expression CumNorm(rval)-given alue = 0 This is a Root Finding problem that can be solved with your SECANT function! Write a Python program that meets the following requirements a) The program must have a function named Norm(xc). This function has one argument named x, a floating point number. This function must calculate and return the value of the Normal function as defined above, for the value of x passed in. (This should require 2 lines of code) b) The program has a function named CumNorn(xval). This function has one argument named xval, a floating point number. This function must calculate and return the value of the Cumulative Normal function for the given xval. This function does NOT print anything. You must use numerical integration in this function. Note that we cannot perform numerical integration with a lower limit of minus infinity. Instead, use a lower limit of (-5). That is surprisingly close enough. (This should require 2 or 3 lines of code) The program has a function named InvCumNorm(givenValue). This function has one argument named givenValue, a floating point number. This function must calculate and return the value of the Inverse Cumulative Normal for the givenValue. This function does NOT print anything. You must use your Secant() fuction in this function. I suggest starting guesses in the near xval c) d) The main progranm a. b. c. Calls Norm(1.5) and prints the answer, nicely formatted, with a label. Calls CumNorm(1.5) and prints the answer, nicely formatted, with a label Calls InvCumNorm(0.90) and prints the answer, nicely formatted, with a label. There is a set of extremely useful functions, used in performing statistical calculations. The values for these functions have historically been placed in tables, in the Appendix of textbooks. The first unction is called the Normal function, and is defined as 0.4 0.3 Norm(x) 0.2 Norm(x) = -e -2 0 2 The second function is the Cumulative Normal function (cumulative meaning to add or integrate) given by the following equation s can be ated using r SIMPSON 0.8 CumNorm(xval) Norm(x) dx CumNorm(x) unction 0.4 0.2 = infinity Table A re -2 0 2 Finaly, there is the Inverse of the Cumulative Normal function which is defined by the following process (not a simple equation) InvCumNorm(givenValue) reysziq Table requires that we search for and return a value of xval that causes the expression CumNorm(rval)-given alue = 0 This is a Root Finding problem that can be solved with your SECANT function! Write a Python program that meets the following requirements a) The program must have a function named Norm(xc). This function has one argument named x, a floating point number. This function must calculate and return the value of the Normal function as defined above, for the value of x passed in. (This should require 2 lines of code) b) The program has a function named CumNorn(xval). This function has one argument named xval, a floating point number. This function must calculate and return the value of the Cumulative Normal function for the given xval. This function does NOT print anything. You must use numerical integration in this function. Note that we cannot perform numerical integration with a lower limit of minus infinity. Instead, use a lower limit of (-5). That is surprisingly close enough. (This should require 2 or 3 lines of code) The program has a function named InvCumNorm(givenValue). This function has one argument named givenValue, a floating point number. This function must calculate and return the value of the Inverse Cumulative Normal for the givenValue. This function does NOT print anything. You must use your Secant() fuction in this function. I suggest starting guesses in the near xval c) d) The main progranm a. b. c. Calls Norm(1.5) and prints the answer, nicely formatted, with a label. Calls CumNorm(1.5) and prints the answer, nicely formatted, with a label Calls InvCumNorm(0.90) and prints the answer, nicely formatted, with a label

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic Net Database Programming

Authors: Rod Stephens

1st Edition

0789726815, 978-0789726810

More Books

Students also viewed these Databases questions