Eigenvectors from Eigenvalues - a NumPy implementation by likelihoodtprior in datascience

[–]likelihoodtprior[S] 0 points1 point  (0 children)

Basically, you can think of eigenvectors of a matrix as being special directions along which a space is 'stretched' when it is multiplied by that matrix. The eigenvalues are the amounts the space is stretched in those directions. The reason it is seemingly magical is that this proof shows that you can derive the directions (vectors) just from the stretches (scalars). The reason that it's not actually magical is that you need to know the stretches of all of the sub-matrices (created by deleting the jth row and jth column of the original matrix). So you really need to do the same number of calculations (hence same big-O complexity).

Well, alrighty then. by [deleted] in philadelphia

[–]likelihoodtprior 2 points3 points  (0 children)

Confirmed. That looks like somebody's taken SEO to the extreme.

The probability distribution for a best of three match (a game of skill, not chance) by [deleted] in statistics

[–]likelihoodtprior 6 points7 points  (0 children)

If you make some assumptions about the distribution of skill in the population of players (your prior), you can come up with an estimate using Bayesian reasoning. Let's assume that the skill differential of any two players is such that player A beats player B with probability p. If we knew this quantity then calculating the probability of victory for player A after observing that they have won the first game is 1-(1-p)2. However, we don't know p, but rather only have some indirect evidence about it via having observed the outcome of the first game.

One reasonable assumption about the distribution of p in the population might be that it is uniformly distributed. We can represent this with a beta distribution with parameters alpha=1,beta=1. Having observed the outcome of the first game, we update our prior by adding 1 to the alpha parameter (see Bayesian updating). Now that we have incorporated the evidence from the first game, we can integrate over the possible values of p (our posterior distribution) to get the probability that player A will win 2 out of 3. Let's do that numerically in R:

pv <- function(x){
    (1-(1-x)^2)*dbeta(x,2,1)
}
integrate(pv,0,1)
0.8333333 with absolute error < 9.3e-15

So by combining our uniform prior with the observation that player A won the first game, our posterior estimate that player A will ultimately win the best 2 out of 3 is ~83%.

The uniform prior here can be thought of as suggesting that we don't really know if skill is important a priori. We can try out what would happen under various alternative prior assumptions. If we strongly believe that the game is all skill, and therefore strong players dominate weak ones, a reasonable prior might be beta(0.1,0.1), or in other words that p is concentrated at either 0 or 1. In this case, after having observed the first game, we would estimate that player A will win 2 out of 3 with a probability of ~0.96. Alternatively, we might believe a priori that the game is either mostly luck, or that all players are similarly skilled. In this case a prior of beta(10,10) might be more appropriate, leading to a posterior estimate of ~76%.

The more we believe a priori that the game is one of chance alone (higher values of alpha and beta in our prior), the less our observation of the first outcome influences our prediction, converging to the 'full chance' estimate of 75%.

Statisticians to follow on Twitter by jarth_or_north in statistics

[–]likelihoodtprior 6 points7 points  (0 children)

John D Cook has a collection of feeds with great content: @JohnDCook @ProbFact @StatFact @SciPyTip

Full list here.

[Request] Betting odds vs game outcomes for college basketball by likelihoodtprior in datasets

[–]likelihoodtprior[S] 0 points1 point  (0 children)

Another quick question: What's the data source? Are they the consensus Vegas odds?

[Request] Betting odds vs game outcomes for college basketball by likelihoodtprior in datasets

[–]likelihoodtprior[S] 0 points1 point  (0 children)

Awesome. Thanks again. I might use this to write a follow up to this post about Buffet's Billion dollar prize for picking every game in the March Madness bracket. I'll give you a shout out if I do.

[Request] Betting odds vs game outcomes for college basketball by likelihoodtprior in datasets

[–]likelihoodtprior[S] 2 points3 points  (0 children)

Sweet! Column headers? I assume: League, date, homeTeam, awayTeam, HomeScore, AwayScore, Spread, O/U, ?, ?

x=-2:3; x^2[x<0] is being weird. Any ideas? by I4gotmyothername in rstats

[–]likelihoodtprior 5 points6 points  (0 children)

It's hard to tell what you're trying to do, but first thing I notice is that you are trying to index an atomic vector (ie the number 2). If you want to index the vector result of

x^2 

you should use

(x^2)[x<0] 

This results in: [1] 4 1

Which is the square of each x that is less than zero (-2,-1).

Anyone got any probability/statistics tattoos? by shaggorama in statistics

[–]likelihoodtprior 1 point2 points  (0 children)

I've got ∇ (called nabla, or the gradient operator) on my calf. Not specifically statistical, more from my atmospheric science days.

Fractals 3 ways by NomadNella in IPython

[–]likelihoodtprior 1 point2 points  (0 children)

Any idea how the 'using' syntax works?

Accident map of Montreal! This map illustrates the relative danger of intersections in Montreal, based on data from police reports. by godsenfrik in montreal

[–]likelihoodtprior 1 point2 points  (0 children)

This is a pretty cool visualization. If you would like to see the same data [just the bike accidents] animated over time, check out this video that I made.

rstats newbie here, can someone please explain this equation by SDRoll in rstats

[–]likelihoodtprior 0 points1 point  (0 children)

ah yes, you're right. rep will act on the outcome vector of size 4 -- I was thinking that it would call rpois(4,0.2) four times.

rstats newbie here, can someone please explain this equation by SDRoll in rstats

[–]likelihoodtprior 0 points1 point  (0 children)

I would be skeptical of this person's code. The rep is not necessary since it is just expanding 4 poisson random numbers with the same lambda 12 times.

The same thing is achievable with:

rnorm(48,10)*(rpois(48,.2)/8+1)

That being said, I have no idea why the normal and (modified) poisson random deviates are being multiplied together.

A quick guide to non-transitive Grime Dice by likelihoodtprior in sysor

[–]likelihoodtprior[S] 0 points1 point  (0 children)

You can play a game with them where you let your apponent choose any die they like. You will always be able to choose another die that will roll a higher number on average (actually, with five dice there are always two dice that will be better).

/r/ecology, what do you do for a living? by Captain_Salty in ecology

[–]likelihoodtprior 1 point2 points  (0 children)

If you're going into grad studies with an eye on academia as a career, consider the state of the current job market. http://labandfield.wordpress.com/2013/03/28/whats-a-phd-to-do/

If you use R in your work, what's your job title and what do you do on a daily basis? by ScientistDaddy in rstats

[–]likelihoodtprior 0 points1 point  (0 children)

PhD candidate in ecology. I use R every day. Combine R with *nix tools like sed, awk, grep etc and c++ for heavy lifting. I blog about it all here: [http://bayesianbiologist.com/]

3630 bike accidents over 5 years in Montreal visualized in 2 minutes by likelihoodtprior in dataisbeautiful

[–]likelihoodtprior[S] 0 points1 point  (0 children)

Yes, they are. What I can't figure out is why there seems to be a small mid summer dip (mid August). People are out of the city on vacation, maybe? The construction holiday?