PhET/C3/Curve-Fitting/English

From Script | Spoken-Tutorial
Revision as of 17:14, 5 October 2018 by Snehalathak (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Visual Cue Narration
Slide Number 1

Title Slide

Welcome to this tutorial on Curve Fitting.
Slide Number 2

Learning Objectives

Demonstrate an interactive PhET simulation

In this tutorial, we will demonstrate Curve Fitting PhET simulation.
Slide Number 3

System Requirements

Ubuntu Linux OS version 16.04

Java version 1.8.0

Firefox Web Browser 60.0.2

Here I am using,

Ubuntu Linux OS version 16.04

Java version 1.8.0

Firefox Web Browser 60.0.2

Slide Number 4

Pre-requisites

The learner should be familiar with topics in high school mathematics.
Slide Number 5

Learning Goals

Lines y=ax + b

Quadratic polynomials y = ax2+bx+c

Cubic polynomials y= ax3 + bx2 + cx + d

Quartic polynomials y = ax4 + bx3 + cx2 + dx + e

Reduced chi squared statistic χr2 and correlation coefficient r2

Using this simulation we will look at,

Lines

Quadratic polynomials

Cubic polynomials

Quartic polynomials

Reduced chi squared statistic and correlation coefficient r squared

Let us begin.
Slide Number 6

Link for PhET simulation

http://phet.colorado.edu

Use the given link to download the simulation.

http://phet.colorado.edu

Show the Downloads folder. I have already downloaded Curve Fitting simulation to my Downloads folder.
Press Ctrl+Alt+T to the terminal.

Type cd Downloads >> press Enter.

Type java space hyphen jar space equation-grapher_en.jar.

Press Enter.

Point to the opened file format.

To open the jar file, open the terminal.

At the terminal prompt, type cd Downloads and press Enter.

Type java space hyphen jar space curve hyphen fitting underscore en dot jar.

Press Enter.

File opens in the browser in html format.

Cursor on the interface. This is the interface for the Curve Fitting simulation.
Point to the Help button, the Functions box and the Data Points bucket in the first quadrant.

Point to Linear and Best Fit default selections.

Observe the Help button, the Functions box and the Data Points bucket in the first quadrant.

In Functions box, Linear and Best Fit radio buttons are default selections.

Click the Help button. Let us click the Help button.
Point to the legend for draggable error bars in the first quadrant.

Point to the data point bucket.

A legend for draggable error bars appears in the first quadrant.

The data points can be pulled out or put in the bucket.

Point to the Best Fit equation in the 4th quadrant.

Point to the display boxes for a and b.

Point to the equation y = a + bx.

Point to r2.

In the fourth quadrant, Best Fit equation is seen with the display boxes for a and b.

The equation is y equals a plus bx.

Below the display boxes is the correlation coefficient r squared.

Point to the χr2 scale.

Point to the formula in the Help box.

In the 2nd and 3rd quadrants is a scale for the reduced chi squared statistic.

The formula for the chi squared statistic is given in the Help box.

Point to the conditions for fit in the Help box. Below the formula, we see the conditions for fit.

Good or very good fit of data with the equation is seen with a chi squared statistic of or below 1.

Click on Hide Help. Let us click on Hide Help to hide these boxes.
Drag three data points out of the bucket.

Place them at (-10, -4), (-4, 4) and (5, 10).

Place the mouse on the co-ordinates to show them.

Drag three data points out of the bucket.

Place them at -10 comma -4, -4 comma 4, and 5 comma 10.

Placing the mouse on them will show their co-ordinates.

Point to the equation y = 6.07 + 0.912 x.

Point to r2 = 0.9616.

Note that the equation for the best fit line drawn is y equals 6.07 plus 0.912 x.

The correlation coefficient r squared for the best fit line is 0.9616.

The closer the r squared value is to 1, the better is the prediction of variance in y from x.

Point to χr2 = 6.74 and the red bar.

Click on Help and to conditions for a poor fit.

Note that the reduced chi squared statistic is 6.74 but the bar is red.

Click on Help and note that this means that the fit is poor. Again click on hide Help.

Drag another data point and place it at (0, 11) on the y axis.

Point to the best fit line, y = 7.51 + 1.004 x.

Let us drag another data point and place it at 0 comma 11 on the y axis.

Note that the best fit line becomes y equals 7.51 plus 1.004 x.

Point to the slope of the best fit line, 1.004.

Point to the y intercept of 7.51.


Point to the data point (0, 11).

Point to r2= 0.8529.

The slope of the best fit line has increased slightly from 0.912 to 1.004.

The y intercept has also increased from 6.07 to 7.51.

The data point 0 comma 11 is further away from the best fit line than the other points.

Note how the r squared value decreases from 0.9616 to 0.8529.

The prediction of variance in y from x with this equation has become less reliable.

Point to the χr2 of 18.66. Note also how the reduced chi squared statistic has increased from 6.74 to 18.66.
Drag the data point from (0, 11) to (0, 6).

Point to the equation y = 6.05 + 0.911 x.

Point to r2 = 0.9635 and χr2 of 3.37.

Drag the data point from 0 comma 11 to 0 comma 6.

Note how the equation becomes y equals 6.05 plus 0.911 x.

The r squared value increases to 0.9635 and the reduced chi squared statistic falls to 3.37.

Drag the data point from (-4, 4) to (-4, 3.5).

The r2 value increases to 0.9772 and χr2 falls to 2.12.

Point to the green bar.

Click on Help and to the green zone indicating good fit.

Click on Hide Help.

Drag the data point from -4 comma 4 to -4 comma 3.5.

The r squared value increases to 0.9772.

The reduced chi squared statistic falls to 2.12.

The bar now becomes green.

Click on Help; the green zone shows good fit.

Click on Hide Help.

A true best fit line explains all the data and gives a good prediction of y values from x values.

Click Adjustable Fit.

Drag sliders a and b to values close to 0.

Show space where erased line was seen.

Point to the line that is now parallel to the x axis.

Point to the display boxes for a and b and to sliders a and b.

Point to the data points.

Point to the red bar and χr2.

Point to the r2 value of 0.

Click Adjustable Fit radio button.

Drag sliders a and b to values close to 0.

Observe how this erases the line drawn earlier.

A line parallel to the x axis is seen.

Slider a and b values will be displayed in the boxes.

The data points are still where we placed them.

But the reduced chi square statistic is very high and in the red zone.

And the r squared value is 0, meaning poor correlation.

Click Best Fit again.

Note down the values for a and b (5.94 and 0.918).

click Adjustable Fit.

Drag sliders a and b and point to the line.

Point to the line.

Drag slider a to 6 and b to 0.97.

Point to the line, r2 (0.9709) and χr2 (2.23).

Click Best Fit radio button again.

Note down the values for a and b (5.94 and 0.918).

Again, click Adjustable Fit radio button.

Now drag sliders a and b from end to end.

Observe the effects of these changes on the line.

Drag slider a to 6 and b to 0.97.

The line looks like the best fit line we saw earlier.

Note r squared and the reduced chi squared statistic.

Check Show deviations and click Best Fit.

Point to the vertical lines from the data points to the best fit line.

Check Show deviations and click Best Fit.

The vertical lines from the data points to the best fit line show the deviations from the line.

Drag the data points at (-4, 3.5) and (0, 6) into the bucket.

Point to the line and the two points.

Point to r2 and χr2.

Drag the data points at -4 comma 3.5 and 0 comma 6 into the bucket.

Note how the line now passes through the two points.

R squared approaches 1 and the reduced chi squared statistic becomes 0.

The fit has become too good because a line is defined by two points.

Without a third point, there is no question of the line being anything but the best fit line.

Now, we will look at some information for you to graph a quadratic polynomial.
Slide Number 7

Quadratic polynomials

FIGURE

y = a + bx + cx2

Degree = 2; quadratic

Maximum 2 roots

(-9, 10), (-7, 2), (2.5, -2.5), (5, 10)

a = -7.89, b = 1.495, c = 0.396

r2 = ?, χr2 = ?

Adjustable Fit

Quadratic polynomials

Quadratic polynomials are of the form y equals a plus bx plus c x squared.

The degree of the polynomial is 2, hence, it is called quadratic.

The function can have a maximum of 2 roots.

Drag and place data points at the following co-ordinates.

-9 comma 10, -7 comma 2, 2.5 comma -2.5 and 5 comma 10

Note the r squared and reduced chi squared statistic values. (0.9794, 4.23)

Also, click Adjustable Fit and see effects of a, b, c on the fit.

Show the best fitgraph for the quadratic polynomial. This is what the best fit graph for this quadratic polynomial will look like.
Slide Number 8

Cubic polynomials

FIGURE

y = a + bx + cx2 + dx3

Degree = 3; cubic

Maximum 3 roots

(-9, 10), (-7, 2), (-6, -4), (5, 10), (13, 2)

r2 = ?, χr2 = ?

Adjustable Fit

Cubic polynomials

Now, we will look at some information for you to graph a cubic polynomial.

Note the r squared and reduced chi squared statistic values.

Show the best fit graph for the cubic polynomial. This is what the best fit graph for this cubic polynomial will look like.
Slide Number 9

Quartic polynomials

FIGURE

y = a + bx + cx2 + dx3 + ex4

Degree = 4; quartic

Maximum 4 roots

(-9, 10), (-7, 2), (-6, -4), (5, 10), (9, 3) (13, 2)

r2 = ?, χr2 = ?

Adjustable Fit

Quartic polynomials

Now, we will look at some information for you to graph a quartic polynomial.

Note the r squared and reduced chi squared statistic values.

Show the best fit graph for the quartic polynomial. This is what the best fit graph for this quartic polynomial will look like.
Slide Number 10

Assignment

As an assignment,

Change the data points and their number.

Follow the steps shown earlier to get best fit graphs for all the polynomials.

Slide Number 11

Summary

In this tutorial, we have demonstrated the

Curve Fitting PhET simulation

Slide Number 12

Summary

Lines y=ax + b

Quadratic polynomials y= ax2+bx+c

Cubic polynomials y = ax3 + bx2 + cx + d

Quartic polynomials y = 'ax4 + bx3 + cx2 + dx + e

Reduced chi square statistic χr2 and correlation coefficient r2

Using this simulation, we have looked at:

Lines Quadratic polynomials

Cubic polynomials

Quartic polynomials

Reduced chi square statistic χr2 and correlation coefficient r2

Slide Number 13

About the Spoken Tutorial Project

Watch the video available at http://spoken-tutorial.org/ What_is_a_Spoken_Tutorial

It summarizes the Spoken Tutorial project

If you do not have good bandwidth, you can download and watch it

The video at the following link summarizes the Spoken Tutorial project.

Please download and watch it

Slide Number 14

Spoken Tutorial workshops

The Spoken Tutorial Project team conducts workshops using spoken tutorials and gives certificate courses on passing online tests.

For more details, please write to us.

Slide Number 15

Forum for specific questions:

Do you have questions in THIS Spoken Tutorial?

Please visit this site

Choose the minute and second where you have the question

Explain your question briefly

Someone from our team will answer them

Please post your timed queries in this forum.
Slide Number 16

Acknowledgement

This project is partially funded by Pandit Madan Mohan Malaviya National Mission on Teachers and Teaching.
Slide Number 17

Acknowledgement

Spoken Tutorial Project is funded by NMEICT, MHRD, Government of India.

More information on this mission is available at this link.

This is Vidhya Iyer from IIT Bombay signing off.

Thank you for joining.

Contributors and Content Editors

Madhurig, Snehalathak, Vidhya