Friday, April 14, 2023

The deceptive game: Inbetweenies

In our teens and early twenties, we are often exposed to card games, and so it was that I discovered inbetweenies (Also known as Acey Deucey, Yablon, and Red Dog). It's a deceptively simple card game that you will almost certainly lose your shirt on! Having watched, won, and lost, I am fascinated by the probabilities, which should be relatively easy to calculate.

The Premise
The game is best played by 5 or 6 players as it becomes difficult to track the cards, and the pot can grow in leaps and bounds. Face cards are valued at 10 and an Ace is usually considered low.
All players contribute a cash amount to a pot. A dealer offers 2 cards face up to a player. Based on the size of the difference, the player proceeds, and bets some amount up to the value of the pot, at which point the dealer deals a third card face-up. If the card's value is between the first two cards, you win the amount that you bet. If the card is outside of those first 2 cards, you lose and have to put that amount into the pot. The real fun starts if you "hit the post". This happens when the third card has the same value as one of your first 2 cards; you have to pay double the amount that you bet. This means that a particularly ballsy player might bet the pot and have to pay in double. I personally saw pots leap to €400 from a modest start of €5 early on. It also means that if you place a bet, you'd better be able to cover the worst outcome!
I've created a simple table below to explain the outcomes 


The Probabilities
As the dealer returns used cards to the bottom of the deck and periodically re-shuffles them, it's possible to calculate some very simple odds in your head at each play. If you were gifted in card counting you could probably do even better, but almost every time I played this game beer was involved so that advantage would probably be lost pretty quickly.

I am going to approach this in two ways: through logical reasoning and then through experimentation using Python.

Logical approach
Knowing that there are 52 cards in a deck we can calculate the basic probability of any hand by looking at how many cards fall between the lowest and highest cards. For example, if the dealer gives a player a 2 and a 10, we know that there are 7 cards in the winning "zone" (3,4,5,6,7,8,9). And we know that there are 4 suits of those cards so 7 * 4 = 28 ways (out of 50 - 2 cards are already dealt) that you can win. The corollary of this is that there are 22 (50 - 28) ways that you can lose. Hitting the post is a different way to lose though, so let's separate that out; 2 cards (low and high) times 3 suits = 6 ways to lose big.
We subtract that from our total ways to lose to get the less painful ways to lose (28-8): 20 out of 50.

Win: 28/50 = 56%
Post: 6/50 = 12%
Lose: 16/50 = 32%


One variation of the game allow the Jack, Queen, and King cards to have their normal values (11,12,13). The same logic applies, and for simplicities sake I've visualized these using a heat map.


Experimentation approach
I used python to simulate the game and visualize the outcomes. The great benefit of the simulation is that I can run a large number of games to test the outcomes. 
After running 1 million games I was able to confirm that the chances of hitting the post is 12% for every hand.

I can also introduce player behaviour. In this case, I can make an assumption that players won't play every hand and will set themselves some threshold, i.e. I'll only play if there is a difference of more than X between the lowest and highest value cards dealt. I was surprised to find that the introduction of this behavior resulted in no change in the outcomes.


What can you take from this?
The major takeaway for players is to favour hands with large differences. This should be obvious but knowing the probabilities allows you to select hands which at least a difference of 7 between them will give you better than 50/50.
Knowing that the odds of hitting the post are 12% might encourage you to think about how much you are willing to bet. One downfall of the game is that the payoffs for different spreads are the same. An innovative variation would be to offer better pay-offs on lower probability spreads. 


Python Code used for research
import pandas as pd
import numpy as np
import random
from copy import deepcopy


print('Rejecting 6 and up')
#Create deck
cardList=[['Ace',1,13,'hearts'],
['2',2,2,'hearts'],
['3',3,3,'hearts'],
['4',4,4,'hearts'],
['5',5,5,'hearts'],
['6',6,6,'hearts'],
['7',7,7,'hearts'],
['8',8,8,'hearts'],
['9',9,9,'hearts'],
['10',10,10,'hearts'],
['Jack',11,11,'hearts'],
['Queen',12,12,'hearts'],
['King',13,13,'hearts'],
['Ace',1,13,'diamonds'],
['2',2,2,'diamonds'],
['3',3,3,'diamonds'],
['4',4,4,'diamonds'],
['5',5,5,'diamonds'],
['6',6,6,'diamonds'],
['7',7,7,'diamonds'],
['8',8,8,'diamonds'],
['9',9,9,'diamonds'],
['10',10,10,'diamonds'],
['Jack',11,11,'diamonds'],
['Queen',12,12,'diamonds'],
['King',13,13,'diamonds'],
['Ace',1,13,'spades'],
['2',2,2,'spades'],
['3',3,3,'spades'],
['4',4,4,'spades'],
['5',5,5,'spades'],
['6',6,6,'spades'],
['7',7,7,'spades'],
['8',8,8,'spades'],
['9',9,9,'spades'],
['10',10,10,'spades'],
['Jack',11,11,'spades'],
['Queen',12,12,'spades'],
['King',13,13,'spades'],
['Ace',1,13,'clubs'],
['2',2,2,'clubs'],
['3',3,3,'clubs'],
['4',4,4,'clubs'],
['5',5,5,'clubs'],
['6',6,6,'clubs'],
['7',7,7,'clubs'],
['8',8,8,'clubs'],
['9',9,9,'clubs'],
['10',10,10,'clubs'],
['Jack',11,11,'clubs'],
['Queen',12,12,'clubs'],
['King',13,13,'clubs']]




#Create column names for data to track
cols = ['observation','lowCardFace','lowCardSuit','lowCardVal', 'highCardFace','highCardSuit', 'highCardVal', 'testCardFace', 'testCardSuit','testCardVal']



##################################################################################
#Functions

def shuffleDeck():
    #Shuffles the deck in place
    tmpDeck = cardList
    random.shuffle(tmpDeck)
    return tmpDeck
    
#Returns 3 cards for a player
def getCards():
    handEvent=[]
    draw1 = shuffledDeck.pop(0)
    draw2 = shuffledDeck.pop(0)
    draw3 = shuffledDeck.pop(0)
    if draw2[2] > draw1[1]:
        handEvent.append([draw1, draw2, draw3])
    else:
        handEvent.append([draw2, draw1, draw3])
    return handEvent
    
    
##################################################################################
#Evaluate a hand
def textValue(lowVal, highVal, dealtVal):
    if dealtVal > lowVal and dealtVal < highVal:
        tmp='win'
    elif dealtVal < lowVal or dealtVal > highVal:
        tmp='lose'
    elif dealtVal == lowVal or dealtVal == highVal:
        tmp = 'post'
    return tmp
        
def diffVal(lowVal, highVal):
    tmp = highVal - lowVal
    return tmp
    
    
##################################################################################
#Run the script by creating an initial deck
shuffledDeck = deepcopy(cardList)
random.shuffle(shuffledDeck)

#I used deepcopy when i was creating a newly shuffled deck. This was needed when i had offered all of the cards in the current deck to the players and had none left.



testRun=[]

for i in range(0,1000000):
    if len(shuffledDeck) < 3:
        shuffledDeck = deepcopy(cardList)
        random.shuffle(shuffledDeck)
    handEvent=[]
    draw1 = shuffledDeck.pop(0)
    draw2 = shuffledDeck.pop(0)
    if abs(draw2[1] - draw1[1])>1:
        draw3 = shuffledDeck.pop(0)
        if draw2[1] > draw1[1]:
            handEvent.append([draw1, draw2, draw3])
        else:
            handEvent.append([draw2, draw1, draw3])
        cardOut = handEvent
        testRun.append([i, cardOut[0][0][0], cardOut[0][0][3], cardOut[0][0][1],cardOut[0][1][0], cardOut[0][1][3], cardOut[0][1][1], cardOut[0][2][0], cardOut[0][2][3], cardOut[0][2][1] ])

playDF = pd.DataFrame(testRun,columns=cols)

#Calculate the outcome and add a column to the dataframe to record that
playDF['outcome'] = playDF.apply( lambda row: textValue(row['lowCardVal'], row['highCardVal'], row['testCardVal']),axis=1)
playDF['diff'] = playDF.apply( lambda row: diffVal(row['lowCardVal'], row['highCardVal']),axis=1)


table = pd.pivot_table(playDF, values='observation', index=['diff'], columns=['outcome'], aggfunc='count', fill_value=0)
print(table)

table = pd.pivot_table(playDF, values='observation', index=['diff'], columns=['outcome'], aggfunc='count', fill_value=0, margins=True, margins_name='Total').pipe(lambda d: d.div(d['Total'], axis='index')).applymap('{:.000%}'.format)
print(table)


playDF.to_csv('C:\\temp\\inbetweenies_output_reject_01.csv', index=False)
print('Execution complete')
    
#Plot charts
flippedCount = playDF.groupby(['diff','outcome'])['observation'].count().unstack('outcome').fillna(0)
flippedCount[['lose', 'post', 'win']].plot(kind='bar', stacked=True)




Tuesday, January 27, 2015

New Mortgage rules and the salary multiple cap

According to Rte the central bank rules for new buyers would be 10% on the first 220k then 20% thereafter so on a 300k house (not unrealistic in Dublin) you'd need a deposit of 38k which equates to 12.6%.
However there was a mention of a borrowing cap of 3.5 times salary so if you want to but that 300k house you will need a combined income of nearly 75k.
Hopefully house prices will reduce but even with the relaxed deposit rule for first time buyers the income multiple threshold may cut them out of the market.

Friday, October 17, 2014

Analyzing a cross section of the Irish secondhand car carket - Part 1

I've been planning to learn a bit more about R and I'm also in the market for a new car so what better time to play around with the data and look at whats available in the Irish car market.

Getting the data
I used Python and the Beautiful Soup package to gather some high level details about the cars available in Ireland. The details that the script pulled was limited to:

  • Make
  • Model
  • Engine
  • Seller Type
  • County
  • Mileage
  • Year
  • Price
Selecting the data
I reduced the list to cars 20 years old and newer. This produced a list of 12990 cars on offer.
The above is produced by in R with: hist(irl_cars$Year)


I focused on a range of Makes and models which excluded high end vehicles. I acknowledge that this was partly to reduce the skewness of the distribution but also on the basis that this analysis focused on cars one might see regularly.

  • BMW
  • Fiat
  • Ford
  • Honda
  • Hyundai
  • Mercedes-Benz
  • Nissan
  • Opel
  • Peugeot
  • Renault
  • Seat
  • Skoda
  • Toyota
  • Volkswagen
  • Volvo


lablist <- as.vector((unique(modCars$Maker))
counts <- table(modCars$Maker)
plot(counts, xaxt="n", main="Qty of Cars by Make")
text(1:15, par("usr")[3], labels=lablist, srt=90, pos=2, xpd=TRUE)

Mileage
Looking at the mileage it looks like there are a number of cars above 500,000 miles
While this is not impossible, it seems unlikely that cars are doing so many miles. So I plotted out the number of miles by year for any cars above 100k:

plot(limCar$Year, limCar$Mileage, main="Mileage plot by Year", xlab="Year", ylab="Miles")
abline(h=400000)
There is a very clear separation (which I have highlighted with a black line) where the bulk of observations lie below the 400,000 mile mark. There is still a great deal of dispersion above this line with some values looking high but not necessarily unreasonable. At this point so common sense might help. The maximum mileage is 2,500,002 miles for an 11 year old car. This implies that car did 622 miles a day every day for 11 years; 60 miles an hour 10 hours a day? Seems very unlikely, so its probably safe enough to discard this as a typo.
What about the ones of 1,000,000 miles and over? The earliest one of those is 13 years old so applying the same logic this would imply 210 miles a day every day for 13 years which equally seems unlikely. 

If the above seems too much like intuition we can apply something a little more reasoned, and I can try out 2 different methods of outlier detection to boot;

  1. Mean and standard deviation
  2. Median and median absolute deviation
Method 1 is more common, but method 2 is better when there are large outliers.
In both cases I am using a k-factor of 3as the threshold to detect outliers
1) Mean(modCars$Mileage) = 75841.97; sd(modCars$Mileage) = 53810.45
75841.97 + (3*53810.45) = 236,913.3 Miles
2) Median(modCars$Mileage) = 74936; mad((modCars$Mileage)=43471.31
74936 + (3*43471.31) = 205,349.90 miles


Method 1 exposes 32 cars and method 2 exposes 78 cars; my "intuition" exposed 13 cars though it was based on a simple visual inspection. I'll create 3 data sets for the follow up posts.




Sunday, August 3, 2014

The Birthday paradox at a wedding

I know I've been very quiet of late but I started a new job 4 months ago and have been pouring myself into it to learn as much as I can. More importantly I've been preparing for my wedding to the lovely Lelly Ann, though to be honest she has been doing most of the tough work so she deserves all the glory!.

The big day is only 5 days away now. I had great hopes of writing a cool optimizer that would seat guests based on their affinity but unfortunately laziness and an over-estimation of my programming skills got in the way. However I have been thinking about the birthday paradox recently and since there will be over 100 people in the room next Friday I thought it was a nice anecdote.

The Birthday paradox arises from the chances of two or more people in a group having the same birthday. Given that there are 365 days (ignoring leap years for simplicitys sake) in a year you would think that the chances that any 2 people might have the same birthday would be extremely low;
however this is not the case.
Wikipedia has a great page on it so I won't reproduce their excellent explanation but it turns out that at 23 people the odds tip over 50%, which is better than a coin toss. In terms of our day we are due to have 106 guests.
The formula is:
1 - (Permutation(365,n)/(365^n)) Where n is the number of people involved.

so 106 guests works out at 99.99999574936430000% or as close to 100% as makes no difference.
We also have tables of 8,10 & 11 which work out respectively at 7.43%, 9.46% & 14.11% respectively. I wonder would it be worth sampling each table to see how many times this actually comes through. with 10 tables we should probably see this at least once!

Wednesday, December 4, 2013

Understanding Monty Hall, and learning Python

Finally back with a post after a long hiatus!

I've finished the Masters that has been sucking the hours out of my life for the last 2 years and suddenly realized that I needed to add some better programming skills to my CV. I started doing the excellent R and interactive Python courses on Coursera. They give a good introduction and provide challenging assignments to help students build their knowledge.

I decided to code up some of the algorithms and concepts I've learned over the last 2 years to  improve my understanding of them and to develop my skills at coding. The first concept I decided to tackle was that of variable change, best captured in the Monty Hall problem.

The Monty Hall problem is a great example of where intuition is at odds with statistics. The player has to guess which of 3 doors of a prize is behind. Upon selection the game show host removes or opens a door that you haven't selected. He then offers you the choice to stick with the door you chose originally or switch to the remaining door.

The most common response is that it shouldn't make any difference; You chose 1 door out of 3 (33% chance) and now there are only 2 doors left so the odds are now 50/50. You may even feel that your odds have improved. So sticking with your initial choice should be as good a choice as switching to the other door.
This is actually wrong! It took me a long time to understand it and the reason is that we get very tied up thinking about winning. Instead lets think about losing. When the game started you had a 2 in 3 chance of picking the wrong door, which means you probably did. Since the other losing door has now been removed it makes the most sense to switch away from the initial (and likely wrong) door you chose in the first place.

Statistical evidence shows that contestants that switch from their initial choice win 2 out of every 3 times. This is what I wanted to code up and demonstrate with python. The table below demonstrates the results I collected over several runs with the python code I developed.


I've included the code snipped below which you can paste into Python or save as a .py and execute.
Appreciate any feedback either if the post was helpful to you, or if you have any improvements to suggest.

<CODE>
import random
import math

def setPrize():


    tmp=[0,0,0]
    door=random.randrange(0,3)

    tmp[door] = 1
    tmp[((door+1) % 3)]=0
    tmp[((door+2) % 3)]=0
       
    return tmp
prize=[0,0,0]
finalDoorz = [0,0]
n=100
   


switchnwin=0.000000
switchnlose=0.000000
sticknwin=0.000000
sticknlose=0.000000


prize = setPrize()

for i in range(0,n):
    prize = setPrize()
    #Player chooses their first door
    choice = random.randint(0,2)
   

    #We put the players choice in position 0
    if prize[choice]==1:
       finalDoorz[0]=1  
       finalDoorz[1]=0        
    elif prize[choice]==0:
       finalDoorz[0]=0  
       finalDoorz[1]=1


    #Second part; stick or switch; 0 stays with the users choice, 1 switches it.
    choiceb= random.randint(0,1)

    if finalDoorz[choiceb]==1:
        status="WIN"
    else:
        status="LOSE"

    if choiceb==0:
        switched="NO"
    else:
        switched="YES"

    if finalDoorz[choiceb]==1 and choiceb==0:
        sticknwin +=1
    elif finalDoorz[choiceb]==1 and choiceb==1:
        switchnwin +=1
    elif finalDoorz[choiceb]==0 and choiceb==1:
        switchnlose +=1
    elif finalDoorz[choiceb]==0 and choiceb==0:
        sticknlose +=1

print "Number of Observations: " + str(n)
print "Switch and Win: " + str(switchnwin/n)
print "Stick and Win: " + str(sticknwin/n)
print "Switch and Lose: " + str(switchnlose/n)
print "Stick and lose: " + str(sticknlose/n)
</CODE>


Tuesday, March 12, 2013

Revenues Property Evaulations

Its been a while since I've posted anything as life has been very quiet because of college, However I just had to get up on my high horse about Revenues new Local Property Tax tool and property evaulations

The Tool
First of all I want to divorce the tool from the content and say that it is great to see them using maps and visualization to get their message across. This sort of thing has been common in the mash up community for some time; overlaying statistics or information on a searchable map. I would question their choice of colours as it makes it very difficult to easily associate a particular hue with its corresponding band, but there is an option to click on a zone and get the relevant information.

The Content
I really am jumping on the bandwagon with the criticism of the valuation process but when I look at the area I grew up in it seems to have a blanket band of €350,000, which is actually Boom prices, not the reality we have 5 years on.
With resources like the property price register (which is a publicly available legal record of the price a house is transacted at over the last 3 years) I'm surprised that they didn't use this information to get a better sense of likely values. In addition there is a wide degree of variation within the dwelling types.


From a quick check on the PPR I see prices of closer to the €250,000 mark being transacted in the recent past. I also notice that the bound seems to defined by the voting district, which to my mind doesn't adequately describe or cluster similar properties together. I suspect if this was done we would wind up with many more, smaller zones.

What could be done to improve the valuations.
Given that we know the closing prices on recently transacted properties and there should be some record somewhere (land commission, planning permission, county council) of each property. This could be cross referenced with some key variables of property type like number of rooms, stories, Square footage to construct a more granular model of the accommodation stock. A clustering algorithm could break down areas into smaller more similar subgroups, which would make valuations more relevant.

What homeowners can do to argue their case
If your house was transacted in the last 2-3 years then you have a very strong basis on which to argue your band, unless you feel that there has been some serious negative equity.
For others the most obvious thing is to look at the property price register over the last 3 years and spot properties that are nearby. It would also be helpful to work out how those houses are the similar or different to your own.
In addition, checking out the prices on DAFT for nearby properties will also help you work out a fairer market price.
There seems to be significant scope for people to argue the valuation of the revenue commissioners  but this also means a lot of work for the commissioners to investigate and respond.
Hopefully they will publish an updated set of valuations before next year so that we can see a more realistic picture of property price declines.


Friday, July 13, 2012

Breaking the ice with Twitter

I was at a tech meet up recently and being my first time there, I didn't know anyone.
I'm not great at networking and I was sitting in a pub, not knowing where the group was.
I sent up some tweets with right hash tags, and voila; several people responded almost immediately!
Twitter as an icebreaker for shy people!

Saturday, May 19, 2012

The Facebook IPO

After all the hype Facebook IPO'd yesterday at $38 a share.

Despite the lackluster price increase, this was technically a successful IPO. In fact it might have been one of the best run IPO's in a long time. This sounds like a strange statement and to be honest I had thought "what a wash out!" but after reading an article on cnet this morning it reminded me that the purpose of an IPO is not to immediately raise the wealth of the people that are buying into the company. It is to raise capital for the company.

The company wants to raise as much money as possible by offering its share. Thus it need to offer them at a price that investors think is reasonable. If the price is too low then people will buy the IPO shares and then sell them very shortly afterwards at a profit.

If the price is too high investors will be reluctant to buy at all, which means the company won't raise the capital it needs; and the share price on the day will collapse below its ipo price - quite embarrassing!

Facebook launched at $38 and closed at $38.23, which means that the company foretasted the amount it could raise to about 99% accuracy. Thus this was a success for them.

The next few days and weeks will tell the true story as to whether the IPO price was good for investors, and this could have repercussions for the reputation of Facebook as a vehicle for investment. If the price begins to sag then people will feel duped and may try to sell off their shares to avoid further losses, further depressing the price for the stock. 
The cnet article also mentions that underwriters intervened to keep the stock at $38, however their pockets aren't limitless and as soon as they stop supporting Facebook we could see a rapid decline in price.

My guess (and this is not based on any maths or deep investment analysis) is that the underwriters will stop supporting late next week. The price will tip forward and back between 37 and 39 over the week and then begin a gradual decline to some lower equilibrium price (probably somewhere in the mid 25's) until the first set of quarterly trading statements. At that point we'll start to get a picture of what is really going on.

For me I don't really see the value. 1bn users who don't pay a thing for the base product.
I heard before (source unknown) that they reckoned that each user was worth $6 annually, but that means each user has to generate $6 of revenue each year.
I can't imagine that clicking on one ad generates $6 in one go so they would probably have to click on at least 10 ads. I've never clicked on one ad.
Another source of revenue might be sharing user data to analytics companies but this is fraught with privacy issues. Upsetting your users might drive them away, or certainly reduce the amount of data that they share.

Bottom line: Facebook are going to have to do a lot to justify that $38 a share.



Saturday, May 12, 2012

Exams - That Electric Feeling!

Well I'm back! My exams are over so hopefully I'll be doing more posting!!

One odd thing I have noticed. In the two weeks running up to the exams I was getting regular static shocks; When I stood up, when I got into or out of the car, when I kissed the LAK (to her annoyance!) But all of a sudden they have just disappeared!

Anyone any ideas?


Saturday, March 31, 2012

Colour Blindness strikes again!!

So part of data mining is clustering, and one of the ways to visualize clusters in the application (Rapid Miner) is through color coding as in the below:
To me, Clusters 0, 4 and 6 appear the same. On closer inspection cluster_0 is different but I have to zoom in.
I really hope that the application has some way of showing these as symbols!

Sunday, February 19, 2012

Welfords One Pass Agorithm

Howdy!
I've continued to be quiet recently as I am back at college so a lot of my time is taken trying to understand the material.

This semester I am taking Simulation and Data Mining. The maths is a lot heavier that last semester. Most of it is covered in the form of proofs in the Simulation course. In addition I am re-learning Java programming, pretty much from scratch so when as I understand the maths bits I then try to code it up in Java or implement it in an assignment solution.

We learned about Welford's One Pass Algorithm during the week and it turns out that it should be implemented in an assignment.The algorithm is an efficient way of calculating mean, variance and standard deviation for a sample on the fly.Normally if we were working on paper or in excel we would store the data first and then run back through it, calculating the individual parts of the equation first and then adding those up to get the final answers. This algorithm allows us to compute mean and variance as we iterate through a loop.
The real value from a computer resource point of view is that we don't have the memory overhead of storing the individual bits of the formula first for calculation after.

 I wasted a lot of time searching the net yesterday in a hungover state trying to find a way to code it up, as I thought that one of the variables was dependent on the the other two and so would not compute properly. Hopefully this blog entry will help anyone searching for it in plain English.

Standard equations
The fomula for the mean is:
The sum of the individual observations divided by n, the number of observations.

The formula for the variance is:
Standard deviation is simply the square root of s above.


As you can imagine in the above you would have to store values first, then send them through a loop to store the individual differences, and then finally do aggregated calculation. Very costly in terms of memory and code.

Welfords One Pass Algorithm
Welfords algorithm gets around this by calculating the minor changes on the fly. This removes the need to store data and simply looks at the delta's.

The algorithm is below; I have used a general notation which you can apply to whatever language you need.
int n = 0;
double xbar = 0.0; //mean
double var = 0.0; //Variance
double x = 0.0; //Next Observation
double d = 0.0; // Difference

For every observation:
{
x = getNextData();
n++;
d = x - xbar;
v = v + (d^2);
xbar = xbar + d/n;
}

v = v/n ***

*** I made this correction after trying to run this algorithm a second time on a different machine.

One problem I had was that if you are working through an array, the first array index is 0, which caused the entire equation to return NaN; but when I added 1 to it to change the indexing it seemed to work.


You can also calculate the covariance quite easily as well
Covariance is simply (the sum of (x*y) - (the sum of x times the sum of y) / n)/n-1
You can collect x*y as you iterate through the loop
sum of X times sum y can be calculated after the fact!

Thursday, December 15, 2011

Exam update

Ok so I haven't blogged in a long time!
Have my first exam (Project management and Decision analytics) tomorrow and then probability and stats on Monday then I am free till the new year.
Will try and blog something worthwhile over Christmas!

Friday, August 5, 2011

European Crisis Part 1

Just heard a report that Sarkozy is having separate meetings with the Germans and the Spanish over the next few days.
Now I understand that this is probably the way these things get done and maybe Sarkozy is playing the facilitator, but to my mind this send a message that the solution is purely being driven by Germany and France and that the other countries are waiting to be told what to do.
If we are trying to sell the idea of Europe as a unified state that is not purely driven by a Franco-Saxon agenda then this is not the way to go.

Wednesday, June 29, 2011

Big day today for Europe - Greek Austerity Vote

Its a big day today for Europe.
I know its a big day for Greece but its potentially a pivotal day for Ireland as well.
If the Greeks do not vote through the austerity measures then they have as good as defaulted. At that point it makes more sense for them to leave the single currency. That way they can set their interest rates, devalue their currency and address some of their problems without the straightjacket they are in now.
Notice I say leave the single currency. Their is no pressure on them to leave the common market.
If they do vote in favor then I can only imagine that the streets of Athens would be a no-go zone for the next week.

For Ireland ( a country that was more than willing not to blindly accept Europe in two referendums) this could be a big moment. If Greece defaults then we will be in the firing line along with Portugal as the next to go down.
And with Greece blazing a trail (particularly if they leave the single currency)then we have a precedent to play with. It could strengthen our bargaining position against Europe and force the ECB into accepting a policy of restructuring. Of course if we are allowed then we may be in technical default as well.

If Greece accepts the Austerity measures then we will continue to kick the can down the road, but I don't see how it helps all of us in the long run. The problem remains in place, to be born by taxpayers that are rapidly running out of patience. If Greece does accept Austerity then it will be at the expense of voters in other countries; and those whose economies are relatively sound but experiencing cuts and unemployment may lose patience with the process. Indeed that could easily become an election platform for the opposition.

Ending this post prematurely as the vote is on right now: 20 For / 18 Against so far!

Update: Motion in Favour passed by 4 votes. Will be interesting to see the counterfactuals in years to come

Tuesday, June 21, 2011

Hello to my Iranian readers!

 Ø³Ù„ام

 Apparently I have had some page views from Iran, so welcome to the blog, and I look forward to any feedback you might have!


regards
Damien

Repossessions

Was Listening to Liveline last week
A man who had his house repossessed has vowed to picket the house for the rest of his life, presumably unless he is reinstated into the property on reasonable terms.

Part of his reasoning is that he should never have been given the mortgage in the first place. Thats quite a true statement. I wonder if at the time, had he been turned down for a mortgage, would he have gone on Joe Duffy to bemoan the fact that he couldn't get financing.

Hearing the phrase, "they shouldn't have given me the money" hardly ignites sympathy in peoples minds, but it is nonetheless a correct statement; so why did they? Our personal solvency laws provide that the borrower remains liable for the full value of the mortgage, even if the house is sold.

In the US the borrower can hand back the keys which closes out the mortgage. This should mean that borrowers would be more discerning as they would stand to lose money as well.

Here the borrower is on the hook for the full amount, which means that the lender can do less due diligence and still make a reasonable assumption that they will get back the bulk of their money. In addition, they have an incentive to sell the house and realize the funds ASAP, rather than hold out for an offer that is a reasonable market price, which would reduce some of the outstanding debt of the borrower.

We are going to see more of this behavior as the number of repossessions rise, not less. There is a substantial danger that we will marginalize those people and their children and in doing so reduce society's respect for personal property.

Friday, June 3, 2011

Mays Beer Post

Its a cracking day out there and i've been stuck inside so I wandered up to Sweeneys Off Licence in Phibsboro to pick up some beers for June, only to realise I hadn't posted in May!

A salute to Polish Beers!
I was in Poland during May so I decided to do a special bit on the country's beers. I started early with Jboy and went through 3 of the better known ones here. This was actually a good idea as the tipple of choice over there was Vodka, and while it was excellent, its hard to write a review after 3 of them

Lech 5.2%
Lech is the first beer I'm trying and I have to say I'm quite impressed! It pours with a golden colour and a head that quickly dissipates. The first impression is crisp and mild honey tones. It finishes with a nice smoky flavour. I always thought Lech was going to be a very generic beer but this would make a good alternative to Heineken
Zywiec 5.6%
Zywiec is more golden in colour than Lech and far less carbonated. I can only describe the aroma as mealy. If I got this from a tap I would even suspect it was slightly off but I am reliably informed this is the way it should smell. Flavour wise it was more hoppy ad bitter than Lech and with a very dry finish
Tyskie 5.6%
Same as the other two Tyskie shows a classic golden colour but the flavour has a lot more bite. There was even a faint white wine smell that I was unable to shake. Quite Bitter

Bierhalle Pils 5.2%
This is the only beer that I actually properly tasted in Poland. The beer hall was in a shopping area in Lodz. They Brewed 3 of their own beers with more to come and even had waitresses dressed in the German beer hall style. Since i was with a group the beer came in a barrel that could be poured by the customer which was a nice touch!

The beer itself was slightly cloudy with a lovely light honey scent. The flavour relfected this with additional corriander and smoky tones.


Also Ran
After I came back I was pretty well behaved for the rest of the month, but I did try a few more:

Flying Dog Double Pale Ale
Flying Dog are going up in my opinion. They modelled themselves after the writings of Hunter S. Thompson and the artwork on the label is always psychadelic.
The double pale ale is a belgian style, with a very high alcohol content. It would be similar to Delerium Nocturnum in flavour. Amber in Colour and a wonderful berry smell. The flavour is a mixture of hops and Citrus. Definetly worth a look but one at a time!
Raging Bitch IPA
Another Flying Dog offering and an IPA to boot. I am on record as saying I don't like IPA's but after a good experience with this and Jagged Edge I am going to give this style another go. This one poured a lovel Amber colourand had a bitter but orangey finish. Quite dry as an after-taste.
Jagged Edge IPA
The final taste for May was Jagged Edge IPA. The Amber colour was once again in evidence but with a less pronounced bitter scent and flavour. The finish was citrusy and I find this style of Fruit flavoured finish makes an IPA more attractive.
Just a reminder to anyone who is reading the blog.

Deveneys in Dundrum is running its Beer Festival again this year in the Tripod. Tickets are on sale now so go buy them, its a great festival and a fantastic way to expand your knowledge!

Official Festival Site
Ruth Deveneys Beer Blog

Saturday, May 7, 2011

April Beer Post - I know its actually May but most of these beers were drank in April.

I was in the porterhouse with some lads I went to college with last night. Against my better judgement I started tasting some beers and while I enjoyed the beers I am paying for it today. All of this reminded me that I haven't done a post in a while!
(I also believe they may be as well!)
Goose Island, India Pale Ale

As a rule I'm not a big fan of IPA's because of the bitter taste but this one was suprisingly tolerable!

I can't describe the colour because I didn't get a glass ( a mortal sin I know!) but the flavour was slightly caramel and orange rind with a mildly malty after taste. I'd definetly recommend this to other people who aren't fans of IPA. According to the beer advocate there are hints of pine but I didn't get these! At 5.9% its certain to give you that happy feeling!

Paulaner Salvator
I had never seen or heard of this till I saw it in the fridge in "against the grain" on Camden St. Clearly a dark beer rich in flavour, its actually a double bock ( stronger version of single bock which is itself a strong sweet malty beer). It loves up to its taste as a lovely malty finish deep. Strong bread like smell with a sweet slightly fruity finish. at 7.9% this was the strongest of the beers taht was tasted in Against the Grain

Triple Karmeliet

I tasted this at a Trappist beer night arrenged by the porterhouse north. I can't remember the name of the guy running the event but he had tremendous knowlegde of his subject.
Triple Karmeliet pour slightly cloudy into the glass with very little head. The aroma was immediately coriander with a hint of caramel and a vague nutty scent and the flavour was all of the above. The taste was a bit hoppy for my liking but certainly a beer to taste, almost like a desert wine. 8.4% gives it a good kick!

Metalman IPA
Metalman has been causign a stir in the Irish craft brewing community over the last few months to the point where you have to dash to a pub when you hear its on tap to try and get a taste! Metalman are basedin Waterford and seem to release batches of their beers on draft only.
The colour is blonde but with a hint of red (i'm colour blind so don't trust this description) As with all IPA's its bitter but with a smoothness I have only seen matched by Goose Island above. The taste is caramel (again!) and honey, but the scent is more about the hops.

Trouble Or
The final beer I am blogging about is Trouble Or. I was lucky enough to taste this just after the keg was opened in the Bull and castle. Its brewed by Trouble Brewing, another addition to the growing army of Irish Craft Brewers.
I'm a bit stumped as to how to describe this. Their spiel is:
"A smooth, refreshing golden ale that is full-bodied and has a distinctive hop flavour.
Brewed using the best two-row Maris Otter pale malt interwoven with a complimentary selection of speciality malt for a robust taste. It is hopped with a combination of traditional English and modern American hops, to produce a beer with subtle fruit flavours and a crisp, lingering finish."

What I tasted was slightly different. I'd definetly agree with the malty falvour but it seemed uncarbonated to me. The colour was golden but slightly cloudy while the flavour was honey, like Fullers Honey Dew. The smell was of grain as well. I'm not certain if this is supposed to be the way it should taste or if it was too young or had not come out right, but I quite enjoyed it. I think the only way is to try it again :)

Thursday, May 5, 2011

The problem of education

I've been thinking about the problem of the teaching profession in Ireland because of all the teachers union conferences recently.
I'm not going to pretend to understand the full career requirements or motivations of people to choose teaching over another profession; but I think that it is an important area of ambiguity that needs to be addressed.

From my point of view the benefits and positives of being a teacher are:
  •     Stable employment once your are taken on full time
  •     Opportunity to work with young people
  •     Opportunity to shape and direct young adults
  •     Able  to focus on a subject that you have some interest in
  •     Long holidays
  •     Tenure (where you are full time)
The negatives (for me) would be:
  •     Putting up with disruptive kids
  •     Repetitive nature of the material
  •     Lack of direction in terms of career development.
I want to focus on the last one for the moment as its probably the one I know least about.
How does a teacher progress? I assume that you start off on an entry grade and over time maybe you teach higher level classes, or more subjects or become year heads. Maybe the ultimate objective is to become principle or vice principal? (Feel free to enlighten me, I really know nothing about this topic!)

In my line of business I advance by going for roles with more responsibility or I move into roles that I feel can benefit from my experience plus give me knew understanding. In theory I can indefinetly move diagonally upwards. to my mind there is effectively a cap on how much authority you can achieve as a teacher.

How do you get salary rises? If your salary is linked to the number of students you teach, or the number of classes you take then you might be able to cheat the system by offering your services and targetting those classes and subjects that are in demand at that time. However this reflects nothing of your achievements. Good exam grades might be a start but only exam year teachers could be assessed. Non-standardised end of year exams can be easily gamed to produce lots of good results; Cross-marking and exam setting have the same vulnerability. Obviously a class full of A's isn't likely so the bell curve can be used to detect cheating in that way, but in effect it pre-determines performance and therefore remuneration?
If anyone wants to explain to me how the Irish system works!

Thursday, April 21, 2011

Good Friday

Just a quick post.
I'm sure these sentiments have been echoed in the media many times before but I just don't understand the logic now in prohibition on Good Friday. It temporarily shuts pubs till midnight, so people stock up in an off Licence the day before, or go out on the tear on the Thursday night instead.

The government should drop the ban for many reasons:
  • It forces people with other religous views to comply with the Catholic churches laws.
  • It fails to prevent people actually drinking on the day
  • It prevents tourists from drinking on a good friday
The biggest reason though is that it attempts to enforce good behaviour. The people who feel strongly about not drinking as a mark of respect to their religion are still free to do so. In fact it should earn them a higher place in Heaven; if they can resist temptation then they really do understand the sacrifice.

Of course one problem is that most people manage to resist that temptation 5 or 6 days each week.
So telling them they can't drink and then closing off all of their options is basically nannying them.
As we we have all experienced in our own lives; when you are told that you have to do something it makes you more likely ro "rebel" and not do it. It might make more sense to force people to drink on the day, that way they might "rebel" positively and not drink!