College Math Teaching

November 29, 2016

Facebook data for a statistics class

Filed under: statistics — Tags: , , , — collegemathteaching @ 6:04 pm

I have to admit that teaching statistics has kind of ruined me. I find myself seeking patterns and data sets everywhere.

Now a national election does give me some data to play with; I used 2012 data for those purposes a few years ago.

But now I have Facebook. And I have a very curious Facebook friendship (I won’t embarrass the person by naming the person).

She became my FB friend in January of 2014. Lately, we’ve been talking a lot, mostly about the 2016 general election. But we went a long time without conversing via “private message”.

I noticed in the first 560 days of our FB “friendship” we exchanged 30 private messages. Then we started to talk more and more. t is time in days since we started to talk (March 2014) and NMSG is the cumulative number of private messages that we exchanged:

fbmessages

So I figured: this has to be an example of an exponential situation, so I ran a regression r^2 \geq 0.99 and got: N = .1248e^{.010835 t} where N is the number of messages and t is the time in days.
carmenpmgraph

Of course, practically speaking, this can’t continue but this “virtually zero” for a long time followed by an “explosion” is a classical exponential phenomenon.

November 1, 2016

A test for the independence of random variables

Filed under: algebra, probability, statistics — Tags: , — collegemathteaching @ 10:36 pm

We are using Mathematical Statistics with Applications (7’th Ed.) by Wackerly, Mendenhall and Scheaffer for our calculus based probability and statistics course.

They present the following Theorem (5.5 in this edition)

Let Y_1 and Y_2 have a joint density f(y_1, y_2) that is positive if and only if a \leq y_1 \leq b and c \leq y_2 \leq d for constants a, b, c, d and f(y_1, y_2)=0 otherwise. Then $Y_1, Y_2 $ are independent random variables if and only if f(y_1, y_2) = g(y_1)h(y_2) where g(y_1), h(y_2) are non-negative functions of y_1, y_2 alone (respectively).

Ok, that is fine as it goes, but then they apply the above theorem to the joint density function: f(y_1, y_2) = 2y_1 for (y_1,y_2) \in [0,1] \times [0,1] and 0 otherwise. Do you see the problem? Technically speaking, the theorem doesn’t apply as f(y_1, y_2) is NOT positive if and only if (y_1, y_2) is in some closed rectangle.

It isn’t that hard to fix, I don’t think.

Now there is the density function f(y_1, y_2) = y_1 + y_2 on [0,1] \times [0,1] and zero elsewhere. Here, Y_1, Y_2 are not independent.

But how does one KNOW that y_1 + y_2 \neq g(y_1)h(y_2) ?

I played around a bit and came up with the following:

Statement: \sum^{n}_{i=1} a_i(x_i)^{r_i} \neq f_1(x_1)f_2(x_2).....f_n(x_n) (note: assume r_i \in \{1,2,3,....\}, a_i \neq 0

Proof of the statement: substitute x_2 =x_3 = x_4....=x_n = 0 into both sides to obtain a_1 x_1^{r_1} = f_1(x_1)(f_2(0)f_3(0)...f_n(0)) Now none of the f_k(0) = 0 else function equality would be impossible. The same argument shows that a_2 x_2^{r_2} = f_2(x_2)f_1(0)f_3(0)f_4(0)...f_n(0) with none of the f_k(0) = 0.

Now substitute x_1=x_2 =x_3 = x_4....=x_n = 0 into both sides and get 0 = f_1(0)f_2(0)f_3(0)f_4(0)...f_n(0) but no factor on the right hand side can be zero.

This is hardly profound but I admit that I’ve been negligent in pointing this out to classes.

Create a free website or blog at WordPress.com.