### Peteris Erins

Shared publicly -I've started writing on Medium at https://medium.com/@p_e.

1

Add a comment...

Start a hangout

Peteris Erins

Worked at Google

Attends University of Cambridge

Lives in London, UK

909 followers|68,190 views

AboutPostsPhotosVideosReviews

I've started writing on Medium at https://medium.com/@p_e.

1

Add a comment...

Hi, I'm a Mathematics student at Cambridge, and currently enjoy category theory as an abstraction vehicle in Haskell, Scala, Clojure. I like to implement small examples of trending research ideas in my blog at http://peteriserins.tumblr.com.

I really believe that Mathematics has the abstractions we need for programming and I would like to see a platform as powerful as Mathematica, but with a more inspired take on substitutions and simplification than rewrite systems.

I really believe that Mathematics has the abstractions we need for programming and I would like to see a platform as powerful as Mathematica, but with a more inspired take on substitutions and simplification than rewrite systems.

3

Add a comment...

Blog: SAT in Clojure core.logic http://peteriserins.com/2011/12/23/sat-in-clojure-core-logic.html.

SAT in Clojure core.logic. 23.12.2011. After reading a decent portion of On Lisp, I never really wrote an actual macro, until now. This is SAT or boolean satisfiability. I was hoping to write it as a ...

1

Add a comment...

Terence Tao originally shared:

Every so often, one sees on the web some poll for the "worst X", where X is some form of popular entertainment; let's take X to be "movies" for sake of discussion, as is the case in the example linked below.

Invariably, the results of these polls are somewhat disappointing; for instance, the list below does certainly contain examples of bad movies, but the ranking seems somewhat arbitrary, and many obviously bad movies are missing from the list.

Of course, much of this can be ascribed to the highly subjective and variable nature of the tastes of those being polled, as well as the over-marketing of various mediocre but not exceptionally terrible movies. However, it turns out that even in an idealised situation in which all movie watchers use the same objective standard to rate movies, and where the success of each movie is determined solely by its quality, a worst movie poll will still often give totally inaccurate results.

Informally, the reason for this is that the truly bad movies, by their nature, are so unpopular that most people will not have watched them, and so they rarely even show up on the polls at all.

One can mathematically model this as follows. Let us say there are N movies, ranked in order of highest quality to least. Suppose that the k^th best movie has been watched by a proportion p_k of the population. As we are assuming that movie success is determined by quality, we suppose that the p_k are decreasing in k. A randomly selected member of the population thus has a probability p_k of seeing the k^th movie. In order to make the analysis tractable, we make the (unrealistic) assumption that these event of seeing the k^th movie is independent in k.

As such, the probability that a given voter will rank movie k as the worst movie (because he or she has seen that movie, but has not seen any worse movie) is

p_k (1 - p_{k+1}) ... (1 - p_N). (*)

The winner of the poll should then be the movie which maximises the quantity (*).

One can solve this optimisation problem by assuming a power law

p_k ~ c k^{-alpha}

for some parameters c and alpha, which typically are comparable to 1. It is an instructive exercise to optimise (*) using this law. What one finds is that the value of the exponent alpha becomes key. If alpha < 1 (and N is large), then (*) is maximised at k=N, and so in this case the poll should indeed rate the very worst movies at the top of their ranking.

If alpha > 1, there is a surprising reversal; (*) is instead maximised for a value of k which is bounded, k=O(1). Basically, the poll now ranks the worst*blockbuster* movie, rather than the worst movie period; a mediocre but widely viewed movie will beat out a terrible but obscure movie.

Amusingly, according to Zipf's law, one expects alpha to be close to 1. As such, there is a critical phase transition (especially if the constant c is also at the critical value of 1) and now one can anticipate the poll to more or less randomly select movies of any level of quality. So one can blame Zipf's law for the inaccuracy of "worst movie" polls.

Invariably, the results of these polls are somewhat disappointing; for instance, the list below does certainly contain examples of bad movies, but the ranking seems somewhat arbitrary, and many obviously bad movies are missing from the list.

Of course, much of this can be ascribed to the highly subjective and variable nature of the tastes of those being polled, as well as the over-marketing of various mediocre but not exceptionally terrible movies. However, it turns out that even in an idealised situation in which all movie watchers use the same objective standard to rate movies, and where the success of each movie is determined solely by its quality, a worst movie poll will still often give totally inaccurate results.

Informally, the reason for this is that the truly bad movies, by their nature, are so unpopular that most people will not have watched them, and so they rarely even show up on the polls at all.

One can mathematically model this as follows. Let us say there are N movies, ranked in order of highest quality to least. Suppose that the k^th best movie has been watched by a proportion p_k of the population. As we are assuming that movie success is determined by quality, we suppose that the p_k are decreasing in k. A randomly selected member of the population thus has a probability p_k of seeing the k^th movie. In order to make the analysis tractable, we make the (unrealistic) assumption that these event of seeing the k^th movie is independent in k.

As such, the probability that a given voter will rank movie k as the worst movie (because he or she has seen that movie, but has not seen any worse movie) is

p_k (1 - p_{k+1}) ... (1 - p_N). (*)

The winner of the poll should then be the movie which maximises the quantity (*).

One can solve this optimisation problem by assuming a power law

p_k ~ c k^{-alpha}

for some parameters c and alpha, which typically are comparable to 1. It is an instructive exercise to optimise (*) using this law. What one finds is that the value of the exponent alpha becomes key. If alpha < 1 (and N is large), then (*) is maximised at k=N, and so in this case the poll should indeed rate the very worst movies at the top of their ranking.

If alpha > 1, there is a surprising reversal; (*) is instead maximised for a value of k which is bounded, k=O(1). Basically, the poll now ranks the worst

Amusingly, according to Zipf's law, one expects alpha to be close to 1. As such, there is a critical phase transition (especially if the constant c is also at the critical value of 1) and now one can anticipate the poll to more or less randomly select movies of any level of quality. So one can blame Zipf's law for the inaccuracy of "worst movie" polls.

4 Nov 2011: In depth looks at all the movies that matter as well as quizzes, fun and games from the world's leading film magazine.

2

1

Add a comment...

In his circles

625 people

I'm in my last year of a Maths BA in Cambridge. I worked on a Twitter-related NLP problem (reach.ly) two years ago and more recently in the "Clojure in linguistics" project with +Zoltán Varjú and +Richard Littauer . Blogged a bit about using logic programming for linguistics there.

I tweet cool papers at @p_e.

I tweet cool papers at @p_e.

1

Add a comment...

Might hit London if I have time.

Happy Hour is a global Dart hackathon for the new Dart language, libraries, and editor. Join us for fun, hacking, and prizes.

1

Add a comment...

Blog: Looking back at 2011 http://peteriserins.com/2012/01/01/looking-back-at-2011.html

Programming. Learned what a startup is and ended up working at one; Went to three hackathons; Learned a whole bunch of programming/query languages; altogether, I wrote stuff using C++, Java, Javascrip...

1

Add a comment...

Blog: Gitit http://peteriserins.com/2011/12/18/gitit.html

Gitit. 18.12.2011. Knowing many people who have forgotten the details of much of what they learned in college and school (and the latter includes myself), I've been trying to figure out a mechanis...

1

Add a comment...

Google originally shared:

We’re teaming up with Saatchi Gallery, London for the Google Photography Prize, a chance for university students around the world to showcase their photos on Google+ and have their work exhibited at Saatchi Gallery, London in 2012.

To enter, pick a category, upload your photos to Google+, share them with the world as a public post, then visit the submission form on the contest website by January 31, 2012.

Don't forget to follow Saatchi Gallery, London's +Google Photography Prize at Saatchi Gallery London page to see ongoing updates on the great work being submitted to the contest!

To enter, pick a category, upload your photos to Google+, share them with the world as a public post, then visit the submission form on the contest website by January 31, 2012.

Don't forget to follow Saatchi Gallery, London's +Google Photography Prize at Saatchi Gallery London page to see ongoing updates on the great work being submitted to the contest!

1

1

Add a comment...

Tim Maclean originally shared:

Here's my painting for the Bill Murray tribute show opening at G1988 (Melrose) tomorrow night. Hope ya like it!

1

Add a comment...

People

In his circles

625 people

Education

- University of CambridgeBA, Mathematics, 2010 - present
- ProgmeistarsProgramming, 2004 - 2007
- Extramural School of Mathematics in LatviaAdvanced Elementary Mathematics for High School students, 2007 - 2009
- Riga State Gymnasium No. 1IB Bilingual Diploma, 2007 - 2010

Basic Information

Gender

Male

Other names

Pēteris Eriņš

Work

Employment

- GoogleSoftware Engineering Intern, 2012 - 2012
- Reach.lySoftware Engineer, 2011 - 2011

Places

Currently

London, UK

Previously

Cambridge, UK - Mountain View, CA - Riga, Latvia - Marupe, Latvia - San Francisco, CA

Public - 3 years ago

reviewed 3 years ago