0% found this document useful (0 votes)
10 views12 pages

Stats Fundamentals02

Uploaded by

Rob
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views12 pages

Stats Fundamentals02

Uploaded by

Rob
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

365 DATA SCENCE 46

6. Setting up Wolfram Alpha

Step 1: Open a browser of your choosing. (We have opted for Google Chrome in this
specific case, but any browser will work.)

Step2: Go to the https://www.wolframalpha.com/ website. (The page you are on,


should look something like the image on the right.)

Step3: Click on the search bar which says “Enter what you want to calculate or know
about.” bar. It will let you type in any mathematical formula you are interested in.

Step 4: Enter the precise formula you are interested in before pressing the “Enter” key
or clicking the compute button on the screen. (The one with the “=“ sign.)
365 DATA SCENCE 47

7. Typing up the integral formula

Now, let’s focus on solving integrals.

Step 1: We start by typing in the words “Integral of” into the search bar, like the image
on the right.

Step 2: Wolfram Alpha’s engine will likely recommend some of the most frequently
searched integrals. If the one you are looking for is included, simply select it from the
list. If not, proceed to the next step.

Step 3: Type in the equation, whose integral you want to solve. For instance, if the
function you are interested in is “𝑦 = 𝑥2”, you type in “x^2”.

Step 4: After we type in the appropriate function we press the “Enter” key.
365 DATA SCENCE 48

8. Expressing Complex Formulas

Now, let’s focus on the various notation we use for the different complex functions.

Power: If we want to express a number raised to a specific degree/power, we use the


“^” sign. For instance, y^n = 𝑦𝑛.

Euler’s Constant: To express Euler’s constant we simply type in the letter “e”.
Pi: If the function we want to use features π, we simply type in the word “pi”.

Natural Log: To express the natural log of a number, we just write the letters “ln”
followed by the number.

Trigonometric Functions: We simply type in the abbreviations for the given function
(e.g. sin, cos, tan, cot)

The expression below is equivalent to ∫ 𝑒𝑥𝜋𝑑𝑥. Note, we omit typing “dx” because it is
trivial when we only have one random
variable.

The expression below is equivalent to ∫ ln sin 𝑥 𝑑𝑥. 


365 DATA SCENCE 49

8.1Understanding the Solution

Now, let’s focus on a specific function like ∫ ex x d x .

Step 1: Type in the integral like we explained earlier and press the “Enter” key:

Step 2: The software provides us with several outputs after computing the integral. We
focus on the first one which is called “Indefinite Integral”.

Step 3: The solution we get is another function which provides an output for any value
x we input into it.

Step 4: We might want to compute the values of this interval within a specific interval
from a to b. In such instances, we add “between a and b” at the end of the integral
before computing.

Step 5: If we have a well-defined range like this, we need to analyse the “Definite
Integral” section for our solution.
365 DATA SCENCE 50

9. Normal Distribution 𝑬 (𝒀) , 𝑽𝒂𝒓(𝒀)

We find the expected value of a function by finding the sum of the products for each
possible outcome and its chance of occurring.

Step 1: For continuous variables, this means using an integral going from negative
infinity to infinity. The chance of each outcome occurring is given by the PDF, 𝑓 𝑦 , so


Step 2: The PDF for a Normal Distribution


is the following expression:


Step 3: Thus, the expected value equals:

Step 4: Since sigma and pi are constant numbers, we can take them out of the
integral:
365 DATA SCENCE 51

Step 5: We will substitute t in fo r to make the integral more manageable. To do

so, we need to transform y and dy.

If , then clearly .

Knowing this, so

Therefore, we can substitute and take the constant out of the integral, before
simplifying:

Step 6: We expand the expression within parenthesis and split the integral:
365 DATA SCENCE 52

Step 7: We solve the two simpler integrals:

Step 8: Since the exponential tends to 0, we get the following:

Step 9: Using Calculus we just showed that for a variable 𝑦 which follows a Normal

Distribution and has a PDF of , the expected value equals 𝜇.

To find the Variance of the distribution, we need to use the relationship between
Expected Value and Variance we already know, namely:

𝑉𝑎𝑟(𝑌)=𝐸(𝑌2)−𝐸(𝑌)2

Step 1: We already know the expected value, so we can plug in 𝜇2 for [𝐸 𝑌 ]2, hence:

𝑉𝑎𝑟𝑌 =𝐸𝑌2 −𝜇2∞


365 DATA SCENCE 53

Step 2: To compute the expected value for 𝑌2, we need to go over the same process
we did when calculating the expected value for 𝑌, so let’s quickly go over the obvious
simplifications.
365 DATA SCENCE 54

Step 3: We already evaluated two of the integrals when finding the expected value, so
let’s just use the results and simplify.

Step 4: We need to integrate by parts next:


365 DATA SCENCE 55

Step 5: The exponential tends to 0 once again, so we get the following:

Step 6: As we computed earlier,

which means:

Thus, the variance for a Variable, whose PDF looks like:

, equals 𝝈𝟐.

Copyright 2022 365 Data Science Ltd. Reproduction is forbidden unless authorized. All rights reserved.
Learn DATA SCIENCE
anytime, anywhere, at your own pace.

If you found this resource useful, check out our e-learning program. We have
everything you need to succeed in data science.

Learn the most sought-after data science skills from the best experts in the field!
Earn a verifiable certificate of achievement trusted by employers worldwide and
future proof your career.

Comprehensive training, exams, certificates.

 162 hours of video  Exams & Certification  Portfolio advice


 599+ Exercises  Personalized support  New content
 Downloadables  Resume Builder & Feedback  Career tracks

Join a global community of 1.8 M successful students with an annual subscription


at 60% OFF with coupon code 365RESOURCES.

$432 $172.80/year

Start at 60% Off


Viktor Mehandziyski

Email: [email protected]

You might also like