Posts

At the pub with a time series

Image
When following the variation of some quantity over time, it is termed a time series.  For example , when plotting the number of births per month in New York city from 1946-1960, there is a peak each summer (seasonability). There is also long-term growth in the number of births each year (a trend). The pilot data below comes from an accelerometer showing the amount of movement produced by an individual over time. This sensor is worn around the neck and produces a data point every second. To keep things interesting, I should mention that the individual wearing this sensor was at the pub for around 2 hours and while there consumed 2 units of alcohol. The rapid spike at the start shows them walking down the stairs to the bar (conveniently located below the School of Psychology). Due to the large number of data points and variation within the data, it is almost impossible to get an idea of what is going on as the evening progresses (if anything!). Although w...

Q:Google's biggest problem today? A:Non-existent Customer Service

Image
Despite the recent unveiling of the new iPad mini , I would maintain that  Google's Nexus 7 tablet represents superior value for money. Granted it weighs a little more and lacks a front camera, but it's over £100 cheaper and that includes a quad-core processor! But there lies a fatal flaw. While the likes of Apple and Amazon have customer service down to a fine art, Google appears to be living on another planet.  Imagine an Amazon order that arrived broken, faulty or late. In almost every case, they would immediately despatch a replacement or issue a refund. Problem solved. My recent experience with Google has taken over a month to reach a similar conclusion. Part 1: The Order* I placed an order for a Google Nexus 7 Tablet on the 18th of September. Money was taken from my account and my tablet dispatched with an accompanying TNT tracking number. Unfortunately, this tracking number was invalid. After several days I phoned Google ...

Kernel Density Plots: Has the histogram had its day?

Image
Simple statistical concepts include the mean, median, standard deviation, and percentiles. These are useful for summarising data. Except these summary statistics are only useful under certain circumstances. When basic assumptions are not met, then any conclusions based on simple summary statistics are likely to be inaccurate. Unable to give a hint as to what is wrong, the numbers can often look perfectly reasonable. Lets consider a sample of 64 reaction time observations (in milliseconds): Mean = 387ms Median = 340ms These look ok, until you view the distribution, which is not unimodal.  Despite being a staple in data visualisation, histograms can often be a poor method for determining the shape of a given distribution because they are strongly affected by the number of bins used. For example, visualising the same data with only four bins can make the same observations appear normally distributed. Similarly, a box-plot can also hide data irregulari...

The Hexaco Personality Inventory - SPSS Script

I am currently using the 60-item version of the Hexaco-PI-R personality inventory and decided to write a short script for SPSS to help speed up the coding process. I have posted it below because I couldn't find anyone else who had posted one online. All items should be labeled as separate numeric variables as hexaco1, hexaco2, hexaco3 ...etc The script computes and prints the results for all reverse scored items and then calculates and prints Factor/ Facet scores. It will also produce Cronbach's Alpha coefficients for each factor. The original scoring key for the HEXACO-PI-R can be found here . ******************************************* *Part 1 - reverse scoring of specific items *Honesty-Humility COMPUTE rhexaco30 = 6 - hexaco30. EXECUTE. COMPUTE rhexaco12 = 6 - hexaco12. EXECUTE. COMPUTE rhexaco60 = 6 - hexaco60. EXECUTE. COMPUTE rhexaco42 = 6 - hexaco42. EXECUTE. COMPUTE rhexaco24 = 6 - hexaco24. EXECUTE. COMPUTE rhexaco48 = 6 - hexaco48. EXECU...

Network analysis: Where are you in my social network?

Image
Michael Slater-Townshend  talks extensively about the merits of understanding your own and other online communities in this in this months Royal Statistical Society magazine. After following his advice, I have discovered that it is surprisingly easy to download your own Facebook data and see which of your friends form connected groups. Several apps allow you to download 'raw' Facebook data in a format that suits almost any statistical package. I used NameGenWeb . The resulting file can then be imported into a variety of statistical packages. I chose to use Gelphi  for this example. My unprocessed Facebook network looks like this... Each dot (or node) is a friend and the lines show friendship connections between each individual.  In order to make things manageable, I ran a cluster analysis to look for groups of people who are more connected to each other. This quickly produced three distinct groups. The larger ...

Do expensive HDMI cables matter?

Image
Having been on the hunt for a new CD player (yes some people still listen to CDs!), I did the usual browse of hi-fi magazines and websites to help guide me towards what might be an improvement over my 18 year old Rotel . That said, it is becoming increasingly difficult to trust any review when some magazines describe a £300 HDMI cable as sounding ' controlled and composed '. This is a cable that carries a digital signal - digital meaning 1's and 0's. By that logic, a more expensive ethernet cable linking your personal computer to a network should also result in a more ' controlled and composed ' internet experience. It won't. In the digital domain, the correct information is either received or it isn't. I have been unable to find any scientific evidence suggesting that a difference in picture quality can be detected between an HDMI cable costing £20 or £200. What I have found is a lot of anecdotal evidence from people who have invested in these ...

Health and Safety: It's a funny old game.

Image
I recently attempted to take some exercise at my local gym and failed miserably. Not through injury or lack of motivation, but simply because I have not yet completed a gym induction programme. Prevented from using the treadmill, I was instead allowed to go for a swim (without any armbands)! The previous day I was also permitted to play squash in the same sports centre without any induction. So what carries more risk - squash or a treadmill? A quick literature search found one paper* that looked at hospital admissions relating to squash injuries in Victoria, Australia between 2000 and 2001. The authors found an overall injury rate of 35.5 injured players per 100,000. Over 90% of these patients were not admitted to the hospital and were discharged the same day. As for running on a treadmill, I couldn't find any meaningful numbers relating to hospital admissions based on running inside or outside. Using some common sense, running inside ...