College Math Teaching

October 12, 2016

P-values and precision of language

Filed under: media, popular mathematics — Tags: , — collegemathteaching @ 2:00 am

I read yet another paper proclaiming that it is “now time to do away with p-values.” And yes, I can recommend reading the article.

From my point of view, one of the troubles with p-values is that there is a misunderstanding as to what they actually mean.

So here goes: the p-value is the probability that, given the null hypothesis is true, one obtains an observation as extreme (or greater) than the given observation. That is, if Y is a random variable with a probability distribution as given by the null hypothesis, and Y^* is the observation, P(Y \geq Y^*) = p .

Example: suppose you assume that a coin is fair (the null hypothesis), and you toss it 100 times and observe 65 heads. It can be shown that P(Y \geq 65) = 0.00175882086148504. So that is the p-value of that particular experiment. That is, IF the coin really were fair, you’d expect to 65 or more heads .1716 percent of the time.

That seems clear enough, statistically speaking.

But when one gets down to the science, one wants to determine whether there is evidence enough to believe one thing or another thing. So, is this coin biased or did this result happen “just by chance”? And strictly speaking, we don’t really know. For example, it could be that we did a precision scientific measurement on the coin and found it to be fair before doing the above experiment. Or it could be that this was just some coin we came across, or it could be that we were asked to examine this coin because of previous suspicious results. This information matters.

And think of it this way: suppose the above experiment was repeated, say, 100,000 times with a coin known to be fair. Then we’d expect to see the above result about 176 times and ALL of those “positives” would be “due to chance”.

Upshot: when it comes to scientific experiments, we still need replication.

October 11, 2016

The bias we have toward the rational numbers

Filed under: analysis, Measure Theory — Tags: , , — collegemathteaching @ 5:39 pm

A brilliant scientist (full tenure at the University of Chicago) has a website called “Why Evolution is True”. He wrote an article titled “why is pi irrational” and seemed to be under the impression that being “irrational” was somehow special or unusual.

That is an easy impression to have; after all, almost every example we use rationals or sometimes special irrationals (e. g. multiples of pi, e^1 , square roots, etc.

We even condition our students to think that way. Time and time again, I’ve seen questions such as “if f(.9) = .94, f(.95) = .9790, f(1.01) = 1.043 then it is reasonable to conclude that f(1) = . It is as if we want students to think that functions take integers to integers.

The reality is that the set of rationals has measure zero on the real line, so if one were to randomly select a number from the real line and the selection was truly random, the probability of the number being rational would be zero!

So, it would be far, far stranger had “pi” turned out to be rational. But that just sounds so strange.

So, why do the rationals have measure zero? I dealt with that in a more rigorous way elsewhere (and it is basic analysis) but I’ll give a simplified proof.

The set of rationals are countable so one can label all of them as q(n), n \in \{0, 1, 2, ... \} Now consider the following covering of the rational numbers: U_n = (q(n) - \frac{1}{2^{n+1}}, q(n) + \frac{1}{2^{n+1}}) . The length of each open interval is \frac{1}{2^n} . Of course there will be overlapping intervals but that isn’t important. What is important is that if one sums the lengths one gets \sum^{\infty}_{n = 0} \frac{1}{2^n} = \frac{1}{1-\frac{1}{2}} = 2 . So the rationals can be covered by a collection of open sets whose total length is less than or equal to 2.

But there is nothing special about 2; one can then find new coverings: U_n = (q(n) - \frac{\epsilon}{2^{n+1}}, q(n) + \frac{\epsilon}{2^{n+1}}) and the total length is now less than or equal to 2 \epsilon where \epsilon is any real number. Since there is no positive lower bound as to how small \epsilon can be, the set of rationals can be said to have measure zero.

October 7, 2016

Now what is a linear transformation anyway?

Filed under: linear albegra, pedagogy — Tags: , — collegemathteaching @ 9:43 pm

Yes, I know, a linear transformation L: V \rightarrow W is a function between vector spaces such that L(V \oplus W) = L(V) \oplus L(W) and L(a \odot V) = a \odot L(V) where the vector space operations of vector addition and scalar multiplication occur in their respective spaces.

Previously, I talked about this classical example:

Consider the set R^+ = \{x| x > 0 \} endowed with the “vector addition” x \oplus y = xy where xy represents ordinary real number multiplication and “scalar multiplication r \odot x = x^r where r \in R and x^r is ordinary exponentiation. It is clear that \{R^+, R | \oplus, \odot \} is a vector space with 1 being the vector “additive” identity and 0 playing the role of the scalar zero and 1 playing the multiplicative identity. Verifying the various vector space axioms is a fun, if trivial exercise.

Then L(x) = ln(x) is a vector space isomophism between R^+ and R (the usual addition and scalar multiplication) and of course, L^{-1}(x) = exp(x) .

Can we expand this concept any further?

Question: (I have no idea if this has been answered or not): given any, say, non-compact, connected subset of R, is it possible to come up with vector space operations (vector addition, scalar multiplication) so as to make a given, say, real valued, continuous one to one function into a linear transformation?

The answer in some cases is “yes.”

Consider L(x): R^+ \rightarrow R^+ by L(x) = x^r , r any real number.

Exercise 1: L is a linear transformation.

Exercise 2: If we have ANY linear transformation L: R^+ \rightarrow R^+ , let L(e) = e^a .
Then L(x) = L(e^{ln(x)}) = L(e)^{ln(x)} = (e^a)^{ln(x)} = x^a .

Exercise 3: we know that all linear transformations L: R \rightarrow R are of the form L(x) = ax . These can be factored through:

x \rightarrow e^x \rightarrow (e^x)^a = e^{ax} \rightarrow ln(e^{ax}) = ax .

So this isn’t exactly anything profound, but it is fun! And perhaps it might be a way to introduce commutative diagrams.

October 4, 2016

Linear Transformation or not? The vector space operations matter.

Filed under: calculus, class room experiment, linear albegra, pedagogy — collegemathteaching @ 3:31 pm

This is nothing new; it is an example for undergraduates.

Consider the set R^+ = \{x| x > 0 \} endowed with the “vector addition” x \oplus y = xy where xy represents ordinary real number multiplication and “scalar multiplication r \odot x = x^r where r \in R and x^r is ordinary exponentiation. It is clear that \{R^+, R | \oplus, \odot \} is a vector space with 1 being the vector “additive” identity and 0 playing the role of the scalar zero and 1 playing the multiplicative identity. Verifying the various vector space axioms is a fun, if trivial exercise.

Now consider the function L(x) = ln(x) with domain R^+ . (here: ln(x) is the natural logarithm function). Now ln(xy) = ln(x) + ln(y) and ln(x^a) = aln(x) . This shows that L:R^+ \rightarrow R (the range has the usual vector space structure) is a linear transformation.

What is even better: ker(L) =\{x|ln(x) = 0 \} which shows that ker(L) = \{1 \} so L is one to one (of course, we know that from calculus).

And, given z \in R, ln(e^z) = z so L is also onto (we knew that from calculus or precalculus).

So, R^+ = \{x| x > 0 \} is isomorphic to R with the usual vector operations, and of course the inverse linear transformation is L^{-1}(y) = e^y .

Upshot: when one asks “is F a linear transformation or not”, one needs information about not only the domain set but also the vector space operations.

October 3, 2016

Lagrange Polynomials and Linear Algebra

Filed under: algebra, linear albegra — Tags: — collegemathteaching @ 9:24 pm

We are discussing abstract vector spaces in linear algebra class. So, I decided to do an application.

Let P_n denote the polynomials of degree n or less; the coefficients will be real numbers. Clearly P_n is n+1 dimensional and \{1, x, x^2, ...x^n \} constitutes a basis.

Now there are many reasons why we might want to find a degree n polynomial that takes on certain values for certain values of x . So, choose x_0, x_1, x_2, ..., x_{n-1} . So, let’s construct an alternate basis as follows: L_0 = \frac{(x-x_1)(x-x_2)(x-x_3)..(x-x_{n})}{(x_0 - x_1)(x_0-x-x_2)..(x_0 - x_{n})}, L_1 = \frac{(x-x_0)(x-x_2)(x-x_3)..(x-x_{n})}{(x_1 - x_0)(x_1-x-x_2)..(x_1 - x_{n})}, ...L_k = \frac{(x-x_0)(x-x_1)(x-x_2)..(x-x_{k-1})(x-x_{k+1})...(x-x_{n})}{(x_k - x_1)(x_k-x-x_2)..(x_k - x_{k-1})(x_k - x_{k+1})...(x_k - x_{n})}. ....L_{n} = \frac{(x-x_0)(x-x_1)(x-x_2)..(x-x_{n-1})}{(x_{n}- x_1)(x_{n}-x-x_2)..(x_{n} - x_{n})}

This is a blizzard of subscripts but the idea is pretty simple. Note that L_k(x_k) = 1 and L_k(x_j) = 0 if j \neq k .

But let’s look at a simple example: suppose we want to form a new basis for P_2 and we are interested in fixing x values of -1, 0, 1 .

So L_0 = \frac{(x)(x-1)}{(-1-0)(-1-1)} = \frac{(x)(x-1)}{2}, L_1 = \frac{(x+1)(x-1)}{(0+1)(0-1)} = -(x+1)(x-1),
L_2 = \frac{(x+1)x}{(1+1)(1-0)} = \frac{(x+1)(x)}{2} . Then we note that

L_0(-1) = 1, L_0(0) =0, L_0(1) =0, L_1(-1)=0, L_1(0) = 1, L_1(1) = 0, L_2(-1)=0, L_2(0) =0, L_2(1)=1

Now, we claim that the L_k are linearly independent. This is why:

Suppose a_0 L_0 + a_1 L_1 + ....a_n L_n =0 as a vector. We can now solve for the a_i Substitute x_i into the right hand side of the equation to get a_iL_i(x_i) = 0 (note: L_k(x_i) = 0 for i \neq k ). So L_0, L_1, ...L_n are n+1 linearly independent vectors in P_n and therefore constitute a basis.

Example: suppose we want to have a degree two polynomial p(x) where p(-1) =5, p(0) =3, p(1) = 17. . We use our new basis to obtain:

p(x) = 5L_0(x) + 3 L_1(x) + 17L_2(x) = \frac{5}{2}(x)(x-1)  -3(x+1)(x-1) + \frac{17}{2}x(x+1) . It is easy to check that p(-1) = 5, p(0) =3, p(1) = 17

September 23, 2016

Carmichael Numbers: “not quite” primes…

Filed under: algebra, elementary number theory, number theory, recreational mathematics — collegemathteaching @ 9:49 pm

We had a fun mathematics seminar yesterday.


Andrew Shallue gave a talk about the Carmichael numbers and gave a glimpse into his research. Along the way he mentioned the work of another mathematician…one that I met during my ultramarathon/marathon walking adventures! Talk about a small world..

So, to kick start my brain cells, I’ll say a few words about these.

First of all, prime numbers are very important in encryption schemes and it is a great benefit to be able to find them. However, for very large numbers, it can be difficult to determine whether a number is prime or not.

So one can take short cuts in determining whether a number is *likely* prime or not: one can say “ok, prime numbers have property P and if this number doesn’t have property P, it is not a prime. But if it DOES have property P, we hare X percent sure that it really is a prime.

If this said property is relatively “easy” to implement (via a computer), we might be able to live with the small amount of errors that our test generates.

One such test is to see if this given number satisfies “Fermat’s Little Theorem” which is as follows:

Let a be a positive integer and p be a prime, and suppose a \neq kp , that is a \neq 0 (mod p) Then a^{p-1} = 1 (mod p)

If you forgotten how this works, recall that Z_p is a field if p is a prime, so a \in Z_p, a \neq 0 (mod p) means that the set \{a, 2a, 3a, ...(p-1)a \} consists of \{1, 2, 3, ...(p-1) \} . So take the product (a)(2a)(3a)...((p-1)a)) = 1(2)(3)..(p-1)a^{p-1} = 1(2)(3)...(p-1) (mod p) . Now note that we are working in a field, so we can cancel the (1)(2)...(p-1) factor on both sides to get a^{p-1} = 1 (mod p) .

So one way to check to see if a number q might be a prime is to check all a^{q-1} for all a \leq q and see if a^{q-1} = 1 mod q .
Now this is NOT a perfect check; there are non-prime numbers for which a^{q-1} = 1 mod q for all a \leq q ; these are called the Carmichael numbers. The 3 smallest such numbers are 561, 41041 and 825265.

The talk was about much more than this, but this was interesting.

August 19, 2016

A fun question concerning projections

Filed under: geometry, popular mathematics — Tags: — collegemathteaching @ 11:34 am

The semester is about to start. I decided to have some fun on Facebook. I took some office shots (yes, my office is messy) and decided to retouch the photos by adding joke photos from Facebook; I wanted to see which friends noticed (without being specifically notified). One did.



Of course, the color alone will give away which “on the wall” photos are genuine and which were put in (via Paint).

But a fun question is: if those photos were to be genuine, what size and shape would they be in real life (to appear the way that they do in those shots). One would give the genuine dimensions of the genuine photos on the wall to help the student solve the problem.

A more sophisticated 3-d version of the problem can be obtained from this cool video:

August 11, 2016

Post Promotion Summer

Filed under: editorial, topology — Tags: — collegemathteaching @ 12:02 am

This is my first “terminal promotion” summer. And while I have something that I have “sort of” written up…I just don’t like the result; it basically fills in some gaps in a survey article. But I think that my thinking about this article has lead me to something that I can add to the paper so that I’ll actually LIKE what I submit.

Then again, my quandary can be summed up in this tweet:


If I wait until I am absolutely in love with my work before I send it out, it will never get sent out.

Hopefully, I’ll have more material to add to this blog this semester.

What I am working on: equivalence classes of simple closed curves; these are one to one, continuous images of the unit circle in 3-space. The objects that I am studying are so pathological that these curves fail to have a tangent at ANY point. One of these beasts can be constructed by taking the intersection of these nested, solid tori.


June 15, 2016

Elementary Math in the news: elections

Filed under: calculus, elementary mathematics, news — Tags: — collegemathteaching @ 9:11 pm

Ok, mostly I am trying to avoid writing up the painful details of a proposed mathematics paper.
But I do follow elections relatively closely. In the California Democratic primary, CNN called the election for Hillary Clinton late on June 7; at the time she lead Bernie Sanders 1,940,588-1,502,043, which is a margin of 438,537 votes. Percentage wise, the lead was 55.8-43.2, or 12.6 percentage points.

But due to mail in balloting and provisional ballot counting, there were still many votes to count. As of this morning, the totals were:

2,360,266-1,887,178 for a numerical lead of 473,088 votes. Percentage wise, the lead was 55.1-44.0, or 11.1 percentage points.

So, the lead grew numerically, but shrunk percentage wise.

“Big deal”, you say? Well, from reading social media, it is not obvious (to some) how a lead can grow numerically but shrink as a percentage.

Conceptually, it is pretty easy to explain: suppose one has an election involving 1100 voters who MUST choose between candidates. Say the first 100 votes that are counted happened to come from a strongly pro-Hillary group, and the tally after 100 was 90 Hillary, 10 Bernie. Then suppose the next 1000 was closer, say 550 for Hillary and 450 for Bernie. Then the lead grew by 100 votes (80 to 180) but the percentage lead shrunk from 80 percentage points to a 16.36 percentage point lead (58.18 to 41.82 percent). And it is easy to see that if the rest of the vote was really 55 percent Hillary, her percent of the vote would asymptotically shrink to close to 55 percent as the number of votes counted went up.

So, how might one have students model it? Let H(t), B(t) be increasing functions of t which represent the number of votes for Hillary and Bernie as a function of time. Assume no mistakes, hence H(t), B(t) can be assumed to be increasing functions. So we want a case there D(t) = H(t)-B(t) is an increasing function but P(t) = \frac{H(t)}{H(t)+ B(t)} decreases with time.

Without calculus: rewrite P(t) = \frac{1}{1+\frac{B(t)}{H(t)}} and note that P(t) decreases as \frac{B(t)}{H(t)} increases; that is, as B(t) outgrows H(t) . But H(t) must continue to outgrow B(t) . That is, the new ballots must still include more Hillary Bernie ballots, but the ratio of Bernie ballots to Hillary ballots must be going down.

If we use some calculus, we see that H'(t) must exceed B'(t) but to make P(t) decrease, use the quotient rule plus a tiny bit of algebra to conclude that H'(t)B(t)-B'(t)H(t) must be negative, or that \frac{B'(t)}{B(t)} > \frac{H'(t)}{H(t)} . That is, the Bernie ballots must be growing at a higher percentage rate than the Hillary ballots are.

None of this is surprising, but it might let the students get a feel of what derivatives are and what proportional change means.

June 7, 2016

Pop-math: getting it wrong but being close enough to give the public a feel for it

Space filling curves: for now, we’ll just work on continuous functions f: [0,1] \rightarrow [0,1] \times [0,1] \subset R^2 .

A curve is typically defined as a continuous function f: [0,1] \rightarrow M where M is, say, a manifold (a 2’nd countable metric space which has neighborhoods either locally homeomorphic to R^k or R^{k-1}) . Note: though we often think of smooth or piecewise linear curves, we don’t have to do so. Also, we can allow for self-intersections.

However, if we don’t put restrictions such as these, weird things can happen. It can be shown (and the video suggests a construction, which is correct) that there exists a continuous, ONTO function f: [0,1] \rightarrow [0,1] \times [0,1] ; such a gadget is called a space filling curve.

It follows from elementary topology that such an f cannot be one to one, because if it were, because the domain is compact, f would have to be a homeomorphism. But the respective spaces are not homeomorphic. For example: the closed interval is disconnected by the removal of any non-end point, whereas the closed square has no such separating point.

Therefore, if f is a space filling curve, the inverse image of a points is actually an infinite number of points; the inverse (as a function) cannot be defined.

And THAT is where this article and video goes off of the rails, though, practically speaking, one can approximate the space filling curve as close as one pleases by an embedded curve (one that IS one to one) and therefore snake the curve through any desired number of points (pixels?).

So, enjoy the video which I got from here (and yes, the text of this post has the aforementioned error)

Older Posts »

Blog at