p-values: an introduction (Part 1)

The starting point

This is the first of (at least) 3 posts on p-values. p-values are everywhere in statistics- especially in fields that require experimental design.

They are also pretty tricky to get your head around at first. This is because of the nature of classical (frequentist) statistics. So to motivate this I am going to talk about a non-statistical situation that will hopefully give some intuition about how to think when interpreting p-values and doing hypothesis testing.

My New Car

I want to buy a car. So I go down to the second hand car dealership to get one. I walk around a bit until I find one that I like.

I think to myself: ‘this is a good car’. 

Now because I am at a second-hand car dealership I find it appropriate to gather some data. So I chat to the lady there (looks like a bit of a scammer, but I am here for a deal) about the car.…

By | August 21st, 2019|English, Level: Simple, Undergraduate|0 Comments

R-squared values for linear regression

What we are talking about

Linear regression is a common and useful statistical tool. You will have almost certainly come across it if your studies have presented you with any sort of statistical problems.

The pros of regression are that it is relatively easy to implement and that the relationship between inputs and outputs is linear (it’s in the name, but this simplifies the interpretation of the relationship significantly). On the downside, it relies fairly heavily on frequentist interpretation of probability (which is a little counterintuitive) and it’s very easy to draw erroneous conclusions from different models.

This post will deal with a measure of how good a model is: R^2. First, I will go through what this value means and what it measures. Then, I will discuss an example of how reliance on  R^2  is a dangerous game when it comes to linear models.

What you should know

Firstly, let’s establish a bit of context.…

By | August 18th, 2019|English, Undergraduate|1 Comment

The 2018 South African Mathematics Olympiad — Problem 6

The final round of the South African Mathematics Olympiad will be taking place on Thursday, 28 July 2019. I have been writing about some of the problems from the senior paper from 2018. A list of all of the problems can be found here.

Today we will look at the sixth and final problem from the 2018 South African Mathematics Olympiad:

Let n be a positive integer, and let x_1, x_2, \dots, x_n be distinct positive integers with x_1 = 1. Construct an n \times 3 table where the entries of the k-th row are x_k, 2x_k, 3x_k for k = 1, 2, \dots, n. Now follow a procedure where, in each step, two identical entries are removed from the table. This continues until there are no more identical entries in the table.

  1. Prove that at least three entries remain at the end of the procedure.
  2. Prove that there are infinitely many possible choices for n and x_1, x_2, \dots, x_n such that only three entries remain,

There are some heuristics that are often helpful when solving a problem, such as

  • Looking at small cases:

    This helps us to understand the problem and how the various pieces in the problem relate to each other.

By | July 23rd, 2019|Competition, English|1 Comment

The 2018 South African Mathematics Olympiad — Problem 5

The final round of the South African Mathematics Olympiad will be taking place on Thursday, 28 July 2019. I have been writing about some of the problems from the senior paper from 2018. A list of all of the problems can be found here.

Today we will look at the fifth problem from the 2018 South African Mathematics Olympiad:

Determine all sequences a_1, a_2, a_3, \ldots of nonnegative integers such that a_1 < a_2 < a_3 < \ldots, and a_n divides a_{n - 1} + n for all n \geq 2.

Since the sequence a_1, a_2, \ldots is strictly increasing, we know that a_n \geq n - 1 for all positive integers n. (We could prove this rigorously by induction.) This means that a_{n - 1} + n \leq (a_n - 1) + (a_n + 1) = 2a_n for all n, and so we know that a_{n - 1} + n is equal to either a_n, or to 2a_n for all positive integers n. Perhaps we should try to figure out exactly when it is equal to a_n, and when it is equal to 2a_n. If we knew, for example, that we always have that a_{n - 1} + n = a_n, then we have reduced the problem to solving this recurrence relation.…

By | July 21st, 2019|Competition, English|1 Comment

The South African Mathematics Olympiad

The South African Mathematics Olympiad is an annual mathematics competition for high-school students in South Africa. The competition is organised by the South African Mathematics Foundation, and comprises three rounds which increase in difficulty. The final round of the 2019 South African Mathematics Olympiad will take place on Thursday, 25 July, and the top ten junior (Grade 8 and 9) and senior (Grades 10—12) competitors will be invited to a prize-giving evening taking place on 14 September 2019. At the same time, the problem selection committee will meet to start setting the 2020 papers.

According to the SAMF, nearly 100000 students participated in the 2017 edition of the competition. The numbers for the 2019 competition are likely to be similar. These students all write the first round of the competition, which learners write at their individual schools in March every year. The papers are marked at the school, and any student with more than 50% is invited to participate in the second round of the competition.…

By | July 11th, 2019|Competition, English, Event, News|8 Comments

Why did we choose that range for theta when doing trig substitutions?

Remember when we are doing a trig substitution, for instance for an integral with:

 

\sqrt{a^2-x^2}

 

We said that we should choose x=a\sin\theta, which seemed reasonable, but we also said that -\frac{\pi}{2}\le\theta\le\frac{\pi}{2}. Where did this last bit come from?

Well, we want a couple of things to hold true. The first is that any substitution that we make, we have to be able to undo. That is, we will substitute x for a function of \theta but in the end we need to convert back to x and so to do that we have to be able to write the inverse function of, in this case x=a\sin\theta. The \sin function is itself not invertible because it’s not one to one, so we have to choose a range over which it is one to one. We could choose -\frac{\pi}{2}\le\theta\le\frac{\pi}{2} or we could choose \frac{\pi}{2}\le\theta\le\frac{3\pi}{2} (amongst an infinite set of possibilities). That would also be invertible. However, remember that we are going to end up with a term of the form:

 

\sqrt{1-\sin^2\theta}=\sqrt{\cos^2\theta}

 

So if we want this to simplify, we had better choose our range of \theta such that \cos\theta is positive, so that we can write \sqrt{\cos^2\theta}=\cos\theta.…

By | August 2nd, 2018|Courses, English, First year, MAM1000, Undergraduate|2 Comments

Integrals with sec and tan when the power of tan is odd

We went through an example in class today which was

 

\int tan^6\theta \sec^4\theta d\theta

 

In this case we took out two powers of sec and then converted all the other \sec into $latex\ tan$, which left a function of tan times sec^2\theta d\theta. We wanted to do this because the derivative of \tan is \sec^2 and so we can do a simple substitution. If we have an odd power of \tan, we can employ a different trick. Let’s look at:

 

I=\int \tan^5\theta\sec^7\theta d\theta.

 

Here, sec is an odd power and so we can’t employ the same trick as before. Now we want to convert everything to a function of \sec and have only a factor which is the derivative of \sec left over. The derivative of \sec is \sec\tan, so let’s try and take this out:

 

I=\int \tan^5\theta\sec^7\theta d\theta=\int \tan^4\theta\sec^6\theta (\sec\theta\tan\theta)d\theta.

 

Now convert the \tan into \sec by \tan^2\theta=\sec^2\theta-1:

 

I=\int (\sec^2\theta-1)^2\sec^6\theta (\sec\theta\tan\theta)d\theta=\int (\sec^{10}\theta-2\sec^8\theta+\sec^6\theta) (\sec\theta\tan\theta)d\theta

 

where here we have just expanded out the bracket and multiplied everything out.…

Fundamental theorem of calculus example

We did an example today in class which I wanted to go through again here. The question was to calculate

 

\frac{d}{dx}\int_a^{x^4}\sec t dt

 

We spot the pattern immediately that it’s an FTC part 1 type question, but it’s not quite there yet. In the FTC part 1, the upper limit of the integral is just x, and not x^4. A question that we would be able to answer is:

 

\frac{d}{dx}\int_a^{x}\sec t dt

 

This would just be \sec x. Or, of course, we can show that in exactly the same way:

 

\frac{d}{du}\int_a^{u}\sec t dt=\sec u

 

That’s just changing the names of the variables, which is fine, right? But that’s not quite the question. So, how can we convert from x^4 to u? Well, how about a substitution? How about letting x^4=u and seeing what happens. This is actually just a chain rule. It’s like if I asked you to calculate:

 

\frac{d}{dx} g(x^4).

 

You would just say: Let x^4=u and then we have:

 

\frac{d}{dx} g(x^4)=\frac{du}{dx}\frac{d}{du}g(u)=4x^3 g'(u).…

Using integration to calculate the volume of a solid with a known cross-sectional area.

Hi there again, I have not written a post in while, here goes my second post.

I would like us to discuss one of the important applications of integration. We have seen how integration can be used to solve the area problem, in this post we are going to see how we can use a similar idea to solve the volume problem. I suggest that we start by looking at the solids whose volume we know very well. You should be able to calculate the volumes of the cylinders below (yes,  they are all cylinders.)

 

circular cylinder                                 rectangular cylinder                triangular cylinder

Cylinders are nice, we only need to multiply the cross-sectional area by the height/length to find the volume. This is because they have two identical flat ends and the same cross-section from one end to the other. Unfortunately, not all the solid figures that we come across everyday are cylinders. The figures below are not cylinders.…

Introduction to trigonometric substitution

I have decided to start writing some posts here, and this is my first post. I would like to introduce trig substitution by presenting an example that you have seen before. Trig substitution is one of the techniques of integration, it’s like u substitution, except that you use a trig function only.

Let’s get into the example already!

\int_{-1}^{1} \sqrt{1-x^2} dx

If you equate the integrand to y (and get x^2+y^2=1, y\geq 0), you should be able to see that this is the area of the upper half of a unit circle. The answer to this definite integral is therefore the area of the upper half of the unit circle (yes, the definite integral of f(x) from a to b gives you the net area between f(x) and the x-axis from x=a to x=b), is \frac{\pi}{2}.

We relied on the geometrical interpretation of the integral to solve the definite integral, but can we also show this algebraically?…

By | August 27th, 2017|English, First year, MAM1000|3 Comments