Least squares: intro to fitting a line to data

Similar documents
Optimal Foraging. Cole Zmurchok Math 102 Section 106. October 17, 2016

AskDrCallahan Calculus 1 Teacher s Guide

Math Final Exam Practice Test December 2, 2013

DIFFERENTIATE SOMETHING AT THE VERY BEGINNING THE COURSE I'LL ADD YOU QUESTIONS USING THEM. BUT PARTICULAR QUESTIONS AS YOU'LL SEE

Algebra I Module 2 Lessons 1 19

Blueline, Linefree, Accuracy Ratio, & Moving Absolute Mean Ratio Charts

Section 2.1 How Do We Measure Speed?

Index. - Registration assistant of momit Home 1 - Start of session/registration 2 - Registration of devices. - momit Home App 1.

BPS 7th Grade Pre-Algebra Revised summer 2014 Year at a Glance Unit Standards Practices Days

d. Could you represent the profit for n copies in other different ways?

Anthony Donaldson, Jr Office Hours- Keene-Flint Hall 213- W 12:00-1:50 P.M. and by appointment History Department

Fourier Transforms 1D

Chapter 5. Describing Distributions Numerically. Finding the Center: The Median. Spread: Home on the Range. Finding the Center: The Median (cont.

Basic Information for MAT194F Calculus Engineering Science 2004

Acoustic concert halls (Statistical calculation, wave acoustic theory with reference to reconstruction of Saint- Petersburg Kapelle and philharmonic)

ECEN689: Special Topics in High-Speed Links Circuits and Systems Spring 2011

Answer questions 1-35 on your Scantron. Questions 1-30 will be scored for the Power Bowl event. In the

Problem Weight Score Total 100

Welcome to MUCT 2210 Exploring Classical Music

Module 1: Digital Video Signal Processing Lecture 5: Color coordinates and chromonance subsampling. The Lecture Contains:

High School Daily Academic Planner Monday, May 7, 2018 GEOMETRY

Design Principles and Practices. Cassini Nazir, Clinical Assistant Professor Office hours Wednesdays, 3-5:30 p.m. in ATEC 1.

TAKE-TWO INTERACTIVE INTERACTIVE SOFTWARE QUIZ

Mobile Math Teachers Circle The Return of the iclicker

in the Howard County Public School System and Rocketship Education

Replicated Latin Square and Crossover Designs

ECE302H1S Probability and Applications (Updated January 10, 2017)

Chapter 3. Averages and Variation

Overview. Teacher s Manual and reproductions of student worksheets to support the following lesson objective:

Statistical Consulting Topics. RCBD with a covariate

Relationships Between Quantitative Variables

THANK YOU FOR PURCHASING HANYOUNG PRODUCT. PLEASE READ THIS MANUAL CAREFULLY.

CLASSROOM ACOUSTICS OF MCNEESE STATE UNIVER- SITY

Simulation of Micro Blanking Process of Square Hole with Fillet Based on DEFORM-3D

Basic Information for MAT194F Calculus Engineering Science 2013

Summer Work. Rising 5th Grade

Technical Appendices to: Is Having More Channels Really Better? A Model of Competition Among Commercial Television Broadcasters

VTX V25-II Preset Guide

COE328 Course Outline. Fall 2007

PART FIVE (V): CONCERTS AND RECITALS UNDERGRADUATES AND GRADUATES WASHINGTON STATE UNIVERSITY SCHOOL OF MUSIC POLICIES AND PROCEDURES

Relationships. Between Quantitative Variables. Chapter 5. Copyright 2006 Brooks/Cole, a division of Thomson Learning, Inc.

More About Regression

MITOCW ocw f07-lec02_300k

MATH 214 (NOTES) Math 214 Al Nosedal. Department of Mathematics Indiana University of Pennsylvania. MATH 214 (NOTES) p. 1/3

Processes for the Intersection

Roman Road Primary School

Data Communications Competence Center

Lecture 18: Exam Review

EEC 116 Fall 2011 Lab #5: Pipelined 32b Adder

7.4 Applications of Linear Systems

1/ 19 2/17 3/23 4/23 5/18 Total/100. Please do not write in the spaces above.

CYPRESS RANCH THEATRE PRODUCTION CONTRACT UIL OAP PETER AND THE STARCATCHER

Check back at the NCTM site for additional notes and tasks next week.

Why Engineers Ignore Cable Loss

The Effect of Plate Deformable Mirror Actuator Grid Misalignment on the Compensation of Kolmogorov Turbulence

Challenges for testing 10GBASE-T

Distribution of Data and the Empirical Rule

Be a Part of the Band!

Bootstrap Methods in Regression Questions Have you had a chance to try any of this? Any of the review questions?

Display Contest Submittals

Broadcast Television Measurements

Writing maths, from Euclid to today

Common assumptions in color characterization of projectors

D. BARD, J. NEGREIRA DIVISION OF ENGINEERING ACOUSTICS, LUND UNIVERSITY

Introduction to Probability Exercises

ESE (ESE534): Computer Organization. Last Time. Today. Last Time. Align Data / Balance Paths. Retiming in the Large

Northern Dakota County Cable Communications Commission ~

Visible Vibrations (originally Chladni Patterns) - Adding Memory Buttons. Joshua Gutwill. August 2002

MITOCW max_min_second_der_512kb-mp4

Delta College Middle School Math Competition Practice Test A 2018

Extra scenario with three versus four E-ferries for the total ferry service of Aeroe

MITOCW big_picture_integrals_512kb-mp4

22/9/2013. Acknowledgement. Outline of the Lecture. What is an Agent? EH2750 Computer Applications in Power Systems, Advanced Course. output.

AP English Summer Assignment. Welcome to AP English I look forward to an exciting year with you next year.

DEPARTMENT OF ENGLISH (THEATRE) Fall Semester

User Guide Stand-Alone Metering for OptiPlant

EE141-Fall 2010 Digital Integrated Circuits. Announcements. Homework #8 due next Tuesday. Project Phase 3 plan due this Sat.

COMP Test on Psychology 320 Check on Mastery of Prerequisites

Measuring Variability for Skewed Distributions

RECOMMENDATION ITU-R BT

Actors Feature Film Agreement

A Keywest Technology White Paper

THE UNIVERSITY OF QUEENSLAND

Suppose you make $1000 a week. Your company is in dire straits, and so you have to take a 50% pay cut.

TTF Tuner Development: Saclay and INFN-Blade

Oct 13, Seattle. Event Guide. connect #WaterLanternFestival

UNIVERSITY OF MASSACHUSSETS LOWELL Department of Electrical & Computer Engineering Course Syllabus for Logic Design Fall 2013

Stow-Munroe Falls High School. Band Honors Guidlines

Draft last edited May 13, 2013 by Belinda Robertson

Introduction to Psychology Prof. Braj Bhushan Department of Humanities and Social Sciences Indian Institute of Technology, Kanpur

What to look for when choosing an oscilloscope

Powell Middle School. Panther Chorus Handbook Alison Smith

Agilent 86120B, 86120C, 86122A Multi-Wavelength Meters Technical Specifications

Ad Specs. Digital Banner Ad Specs DESKTOP BROWSER CREATIVE SPECIFICATIONS CREATIVE DEADLINES. 300X250 pixels pixels.

1. Structure of the paper: 2. Title

-Technical Specifications-

Chapter 27. Inferences for Regression. Remembering Regression. An Example: Body Fat and Waist Size. Remembering Regression (cont.)

SPINNER BROADCAST EXPLANATION OF THE MULTI CHANNEL COMBINER SPECIFICATIONS

Logic Design II (17.342) Spring Lecture Outline

Setting Up the Warp System File: Warp Theater Set-up.doc 25 MAY 04

Transcription:

Least squares: intro to fitting a line to data Math 102 Section 102 Mingfeng Qiu Oct. 17, 2018

Announcements Solution for the worksheet last week has been uploaded. If you find a mistake, let me know. Keep up with your required coursework and extra practice. I ll do whatever I can to help you. I m not here on Friday except for the lecture, neither can I answer emails. Help for OSH 4: Dr. Lisanne Rens @MATX 1118, 2-3 pm

Today... 1. Time concepts 2. Finish up Optimal Foraging 3. Measuring central tendency: average 4. Fitting a line to data

Time Two kinds of time that we talk about: A period of time: cannot be negative A moment: relative to a certain event. Can be negative

Bear eating berries Q6. t = kτ. There are two different patches which take the same amount of time τ to get to. In which patch should the bear spend more time in order to maximize the average energy gain? A. f(t) B. f(t) t t f(t) = t 20+t f(t) = t 200+t

Bear eating berries Q6. Recall that t = kτ. There are two different patches which take the same amount of time τ to get to. In which patch should the bear spend more time in order to maximize the average energy gain? A. f(t) B. f(t) t t f(t) = t 20+t f(t) = t 200+t If τ is fixed, but there are two patches, one with k 1 and one with k 2. The bear must stay in patch with the bigger k i longer, to optimize the average rate of energy gain.

Average energy gain Recall: Average energy gain per unit time: energy gained = f(t) R(t) = energy gained total time spent total time spent = travel time + time at patch = τ + t R(t) = f(t) t + τ.

Optimizing the average energy gain R (t) = f (t)(t + τ) f(t) (τ + t) 2 Q7. The critical points of R(t) satisfy A. t = kτ B. t 1,2 = ± kτ C. f (t) = f(t) τ+t D. f (t) = 0, f(t) = 0 E. f(t)(τ + t) = f (t)

Optimizing the average energy gain The optimal time t satisfies which is the same as R (t) = f (t)(τ + t) f(t) (τ + t) 2 = 0, f (t) = f(t) τ + t = R(t) The optimal time t is the time at which the instantaneous rate of food collection (f (t)) equals the average rate of food collection R(t).

Marginal Value Theorem Marginal Value Theorem: To maximize energy intake, the optimal time to stay at a patch of food with energy collection function f(t) with travel time τ is f (t) }{{} = R(t) }{{} instantaneous rate average rate The rate of benefit of a given resource is maximized by exploiting the resource until the rate of benefit falls to the maximum average rate that can be sustained over a long period.

Marginal Value Theorem: Geometry f (t) = f(t) τ + t = R(t) f (t) = slope of tangent line f(t) τ+t = ratio f(t) f 0 (t) f(t) t τ +t

Marginal Value Theorem: Geometry f (t) = f(t) τ + t f(t) f 0 (t) τ t

Summary for optimal foraging On Monday and today we developed a simple model for how an animal collects food (gains energy) in a patch. looked at the various types of food patches, with different f(t). calculated the optimal time for a specific example (Bear eating berries) discovered the Marginal Value Theorem and interpreted it geometrically

Fitting data: least squares The content about least squares is found on Canvas > Main Resources > Calendar (weekly schedule) > Week 7 supplement. Link here

Zebrafish posterior lateral line primordium (PLLP)

Zebrafish PLLP wnt10a lef1a fgf10a fgfr1 pea3 Ajay Chitnis, Damian Dalle Nogare, NIH

Size of lef1 domain relative to the PLLP PLLP length lef1 zone length

Size of lef1 domain relative to the PLLP Let x = length of lef1 zone length of PLLP. In four experiments, the ratio of the lef1 domain to the PLLP was found to be x 1 = 0.84, x 2 = 0.49, x 3 = 0.72 and x 4 = 0.53.

Measuring central tendency Data set: x 1, x 2, x 3, x 4 Goal: Find a number M that summarizes the data set Idea: Find M such that the sum of squared residuals (SSR) is as small as possible f(m) = 4 (x i M) 2 = (x 1 M) 2 + (x 2 M) 2 i=1 + (x 3 M) 2 + (x 4 M) 2 Each r i = x i M is called a residual.

Measuring central tendency M x 1 x 2 x 3 x 4

Measuring central tendency Minimize f(m) Critical Points f (M) = 2(x 1 M) 2(x 2 M) 2(x 3 M) 2(x 4 M) = 2(x 1 + x 2 + x 3 + x 4 ) + 8M M = x 1 + x 2 + x 3 + x 4 4 when f (M) = 0 This turns out to be the global minimum. It is the average of the data points!

Average size The average relative size of lef1 domain is M = x 1 + x 2 + x 3 + x 4 4 0.89 + 0.49 + 0.72 + 0.53 = 4 = 0.6575.

Measuring central tendency The average, or mean, results from minimizing the SSR for horizontal line to data: n i=1 M = x i n M x 1 x 2 x 3 x 4

Size of lef1 domain relative to the PLLP add SU5402 (drug) PLLP length lef1 zone length increases with SU5402 The size of the lef1 domain increases with the concentration of SU5402 added

Fitting a line to data SU5402 concentration µm 0 0.4 0.8 1.2 lef1/pllp length ratio 0.51 0.58 0.68 0.75 length ratio 1 0.5 0 0 0.5 1 1.5 concentration (µm)

Fitting a line without intercept SU5402 concentration µm 0 0.4 0.8 1.2 change in length ratio 0 0.07 0.17 0.24 0.4 length 0.2 0 0 0.5 1 1.5 concentration (µm)

Fitting a line without intercept Fact (Line fitting without intercept) Suppose we have n data points (x i, y i ) where i = 1, 2,, n, which are fit by a line through the origin y = ax. The SSR is n (y i ax i ) 2. i=1 The value of a that minimizes the SSR is a = n i=1 (x iy i ) n. i=1 x2 i

Fitting a line without intercept to data x i 0.4 0.8 1.2 y i 0.07 0.17 0.24 r i 0.07 0.4a 0.17 0.8a 0.24 1.2a a = n i=1 (x iy i ) n i=1 x2 i = x 1y 1 + x 2 y 2 + x 3 y 3 x 2 1 + x2 2 + x2 3 0.4 0.07 + 0.8 0.17 + 1.2 0.24 = 0.4 2 + 0.8 2 + 1.2 2 = 0.452 2.24 = 113 560 0.2. Best fit line: y = 0.2x

Fitting a line without intercept to data 0.4 length 0.2 0 0 0.5 1 1.5 concentration (µm) y = 0.2x

Answers 6. B 7. C