Custom Search
If you want to discuss more on this or other issues related to Physics, feel free to leave a message on my Facebook page.
Showing posts with label straight line. Show all posts
Showing posts with label straight line. Show all posts

Monday, November 22, 2010

How to draw lines of best fit?

In many questions in Physics or often in a practical students are often required to draw a line of best fit.

So what is the line of best fit. The line of best fit is a line that is drawn through a series of points in a graph in order to determine the trend in the points. The line can then be used to determine the gradient and the y-intercept of the line if it is a straight line.

The following are tips that you can use in order to obtain the best line of best fit from a few points. You should read all of them and choose which tips is appropriate.

Tip 1

Sometimes you will obtains points that are as shown below in fig 1. Although I must say that such occurrence is quite rare. In fig 1 below you can see that the points forms an almost perfect straight line. In such a case it would be enough to choose two points far away from each other and then draw a line from one to the the other. Make sure that the line extends on both side to cover all the points.

Untitled

Fig 1

Tip 2

Most of the time you will be faced with points as in fig 2 below. As such you will have to draw a line such that the points are on both sides of the lines as such. A you see from one side of the line to the other the points alternates up and down. Also make sure that two points that are closest to each other and are on different sides of the line are the same distance from the line.

Untitled2

Fig 2

Tip 3

In case you are unable to make the points alternate on both sides of the line from one end of the line to the other as in fig 3 below. It is acceptable to have them two by two on the same side of the line.

Untitled3

Fig 3

Tip 4

It may happen as in fig 4 below that one point is so far from the others that it would make no sense to include it when drawing the line of best fit. This point is called an outlier and it is often the result of an error in calculation, an error in taking readings such as parallax error or zero error. It is advisable to check the data again.

Untitled 2

Fig 4

Tip 5

Although I had said that it is possible to have the points two by two on both side of the line. It is not possible to have them as in fig 5 below. 

Untitled1

Fig 5

 

If you are in the situation that I described as in fig 5 above then you can draw the line as in the fig 6 below.

Untitled4

Fig 6

So if you have any difficulties drawing the line then review the five different tips above you will surely find a tip for you. Otherwise send me a picture of the points and we will see it together.

Saturday, November 6, 2010

What is the y-intercept?

We have seen in a previous post the gradient of a straight line graph. Today we are going so have a look at the y-intercept.

Now as you know a graph is composed of two axes. The y-axis and the x-axis as shown in fig 1.

clip_image001[14]

Fig 1

Now in order to find the y-intercept you will need a straight line that passes through the y-axis, i.e it intercept the y-axis,  as seen in fig 2 below.

clip_image001[16]

Fig 2

As you can see in fig 2 above all three lines crosses the y-axis. As a result the three lines would have a y-intercept.

How to obtain the y-intercept of a straight line?

1. If the x-axis starts at 0

As you can see in fig 3 below the point at which the line crosses the y-axis is at the y=2 coordinate. Hence the y-intercept is 2.

We can thus define the y-intercept as being the value of the y-coordinate when the x-coordinate is 0. 

image

Fig 3

2. If the x-axis does not start at 0

As you can see in fig 4 below the x-axis does not start at 0. Hence as you may have guess wrongly the y-intercept is not 2 since according to the definition the y-intercept is the y-coordinate when the x-coordinate is 0.

So how do you obtain the y coordinate.

image

Fig 4

You will first have to calculate the gradient of the line using the method described in this post.

The gradient in this case is 1.

You will use the equation y = mx + c  and a coordinate on the line in this case (3,2).

y = 2

x=2

gradient = m =1

Hence the only variable left is c, the y-intercept.

3 = 1*2 + c

c = 3 – 2 =1

The y-intercept of the line is thus 1.

You should thus be very careful to check that the x-axis starts with 0 or does not start with 0 so as to choose which of the two methods to use.

Wednesday, January 6, 2010

What is the gradient and how to determine it?

The gradient of a line or the slope of a line is an indication of how steep a line is at a particular point. The gradient is particularly important in Physics and as a result it is particularly important that you understand how to calculate it perfectly.

Gradient of a straight line

We have in fig 1 below two straight lines that have different slopes. We are going to see how to determine the gradient of both straight lines.

image

As you can see, there are two straight lines: a blue one and a red one.

It is clear that the red one is steeper than the blue one and as a result its slope would be greater. Consequently the gradient of the red line is greater than that of the blue line.

But do you know how to determine the gradient of the two straight lines mathematically?

Let us look at the red line first and then you are going to look at the blue line.

Loot at the line and the take two coordinated off the line.

I have taken (1,2) and (4,8)

These two coordinates would be considered as (x1,y1) and (x2,y2) such that

From the first coordinate you have x1 =1 and y1=2

from the second coordinate you have x2 =4 and y2 = 8

In order to calculate the gradient of the red line we are going to use the equation below

clip_image002

Hence using the equation above the gradient of the red line is calculated as shown

gradient of red line = (8-2)/(4-1) =6/3 = 2

If you want to check if you can calculate the gradient of the blue line you can do so by repeating the process above.

What you would also find is that any pair of coordinates that you take will give you the same gradient. Which mean that at any point along the straight line the gradient is the same.

Gradient of a curve

The method to calculate the gradient at a point along a curve is slightly different. In that you first have to draw a tangent to the curve at the point that you want to calculate the gradient.

image

Fig 2

As you can see in fig 2 above, I want to calculate the gradient of the curve at the point (3, 27) as a result I have drawn a tangent to the curve at that point. If you do not know how to draw a gradient I can show you later on in a later post.

Now that you have drawn a tangent at the point that we want (3,27) you will need to choose any two coordinates on the tangent line.

I have chosen (2.5 , 4) and (4 , 60). You can choose any coordinate on the tangent.

Hence using the coordinated below the gradient of the curve at the point (3,27) is

Gradient of curve at point (3,27) = (60 – 4)/(4 - 2.5)= 56/1.5 = 37.3 =37 (2 sf)

As you can see it is easy to calculate the gradient of a straight line or a curve at a particular point.

Related Posts Plugin for WordPress, Blogger...