July 19, 2011

Are they really different? UCAS PS and Grad school SOPs

Writing about web page http://phdsucceed.blogspot.com/2011/05/writing-statement-of-purpose.html

Time to dust off the cobwebs!

Browsing Gradcafe in general, I came across the above blog, and found pretty useful stuff in there. One thing that struck me was how much of that would be relevant even for a UCAS personal statement. If that seems like a great leap of logic to you, it probably is; I only thought of it because I've been helping Mavis out with the usual university talks and fairs.

Some of the more absurd questions:

- What is the SAT requirement to enter Warwick?
- Does Warwick offer a liberal arts course?

Ok, the second is not really that absurd because I've heard that we did consider doing one.

Back to my point, most of the time, I had questions about the application process. Now, it's been 5 years since I did my UCAS, but I do recall writing the personal statement and we were pretty blessed and well taken care of in RJC what with Mr Purvis and Mr Sowden telling us how to go about the whole process. Most schools do not offer such guidance. In fact, Mavis does do some Personal Statement writing workshops herself at schools.

Essentially, what I think is: both do require one to write about why one is choosing that particular course/discipline to study. This is a much more serious matter for graduate school, but is it any less important for an undergrad degree? I don't think so. One should probably have given the matter quite a good amount of thought, to avoid the pitfalls of having to change course/switch degrees halfway.


September 22, 2010

Where did all that time go!

In about a week's time, I'll be flying back to the UK! 

Almost time to submit report and poster. Second draft of report is finished, poster is unfinished yet. Hoping to get everything done by next Monday.

Of course, I made a rather good prediction - with the CSC resources going offline far too often in the past month, I've just barely managed to scrape by with the simulations I need. I've even resorted to running some on my 5 year old desktop at home!

Note to self: Think further ahead when running simulations - get the parameters right! I now have data which are not very compatible with each other, sigh. Wouldn't be that bad if I had the resources to get my simulations re-run quickly!

---------------------------------------------

Turns out after I posted the last entry I had the chance to speak to a friend who's working with the Singapore Land Transport Agency (LTA), and so I had a chance to ask him about Distance-based fares.

"So, how did you guys come up with the 66% figure? Based on real data?"

"Yes, that's right."

"Hmm, alright. Is it also true then that the fare decreases are mostly less than 10 cents while the increases are mostly greater than 10 cents?"

"Hmm, yes, you could say that."

"So there's an overall increase in revenue?"

"Yes."

Before anyone misunderstands, I'm not criticising the increase in revenue, after all, inflation is (somewhat) a part of life. I just wish to point out how a figure being thrown about can be rather meaningless, in this case the two-thirds having lower fares being repeatedly mentioned. I have no access to the real data to verify if it is true in any case. (Britons, rejoice that you actually have the Freedom of Information Act!)

In any case, I've done my fair bit in abusing the new fare system. I had to take a bus ride back home, where I was faced with the option of getting off and walking 7 minutes home or changing to a feeder bus service right to my doorstep. Under the old fare system, the latter would cost me an extra 25 cents. It cost me only 8 cents now.



August 27, 2010

Week of unproductivity

Not surprisingly, this past week has been rather unproductive.

2 days gone to getting ready for and flying itself. Add in dinners, general enjoyment of being back home, going out and you have not much work done.

I mentioned distance-based fares. So far I've not been taking notice of it. Public transport is cheap when it's half or less than half of what one pays in London or Coventry. So is eating at restaurants - 30 dollars (about 14 pounds) at a good Japanese restaurant is not too bad!

I've left some simulations to run but for some reason the one i started on last Friday aborted itself, and the restart on Tuesday morning still has yet to finish a full simulation.

Now to wait.


August 17, 2010

Distance–based fares

Not related to my project, but of some academic interest IMO.

Original Press Release

Latest News article

Something that I've been following somewhat with interest, mainly because it affects my family and I directly! Also a good distraction as I'm now almost done with the URSS project.

There was a poll conducted in popular Singapore web forum. More than 80% of the people who answered the poll said they saw an increase in their transport fares. I am highly sceptical about this as the thread itself was rather politicised, so there exists a fair amount of bias.

However, I'm also highly sceptical of the figures touted by official sources. Foremost is, how did they arrive at the figure quoted?

Indeed, if you were supposed to give such a figure, how would you model and arrive at your answer? 

Next question: Given how people's travel patterns vary hugely, would quoting a % of people who would see a decrease in fares be meaningful?

From a policy perspective though, I will have to say that a move to distance-based fares is a good idea in principle. However, implementing it would be a bitch wouldn't it? There's also the question of bus routes being far from optimal - this is one of the main reasons why I dislike taking buses in general!


August 05, 2010

Simple simulation – Am I being naive?

Saw this sometime last week: http://bengoldacre.posterous.com/i-think-this-guardian-story-is-a-bit-wrong

I will not rehash the main points, but the idea that popped up in my mind was, the patients will not necessarily all have the same mortality rate so what happens if we have a population of patients with different mortality rates?

I thought of possible ways to simulate this, but did not sit down to try it till today. Took me a while to figure out the relevant MATLAB commands and to structure it. Thanks goes to Leonard who gave me some ideas on how to write the code.

Simple assumptions of population of patients:

  • 10% have 6% mortality rate (difficult case)
  • 25% have 3% mortality rate (moderate case)
  • 65% have 1% mortality rate (simple case)

And then each hospital has a certain number of patients, which is fixed. How do the hospitals do?

For size 5:

Value    Count   Percent
     0     2653     26.53%
     1     5081     50.81%
     2     1946     19.46%
     3      301      3.01%
     4       19      0.19%

For size 10:

Value    Count   Percent
     0      541      5.41%
     1     2118     21.18%
     2     3224     32.24%
     3     2488     24.88%
     4     1188     11.88%
     5      370      3.70%
     6       67      0.67%
     7        4      0.04%

I did 10000 realizations on both.

Would it be fair then to say that a hospital with low number of patients can easily get a high mortality rate by just being unlucky?

MATLAB code for those interested below. I may have missed out something as I finished this in less than an hour!

-------------------------------------------------------------------------------

function AAAsim(nRlz,sz)
% Simulation of AAA patients.
% Assume 2% mortality in general
% 3 Classes of Patients:
% 10% chance of patient with 6% mortality
% 25% chance of patient with 3% mortality
% 65% chance of patient with 1% mortality
%
% Assume each hospital has sz patients

n = nRlz * sz; %population size

index = randperm(n); % Randomly order patients

for i=1:nRlz
   a = sz*(nRlz - 1) + 1;
   b = sz*(nRlz);
   sample = index(a:b);
  
   sam_death = 0;
   for j=1:sz
       pt = sample(j);
       if(pt <=(0.1*n));
           prob = 0.6;
       elseif(pt > (0.1*n) && pt <=(0.35*n));
           prob = 0.3;
       else(pt > (0.35*n));
           prob = 0.1;
       end
       prob;
       ptdoa = binornd(1,prob); % Returns 0 if alive, 1 if dead
       sam_death = sam_death + ptdoa;
   end
   deaths(i)= sam_death;
   fprintf('Iteration number %d completed.\n',i);
end
tabulate(deaths)
hist(deaths,0:sz)


July 17, 2010

Paul the Octopus

A week ago, a friend of mine (who's currently reading economics, may I add) posted the link to a BBC article talking about the probability of Paul the Octopus being psychic. His comment was something along the lines of statisticians wheeling out binomial distributions and had a rather spiteful tone to it. Of course, I see this as a personal affront to my chosen line of work. Hence, I started thinking about the best way to argue this, and of course, prove the well-known fact that economists are rubbish at probability and statistics.

I shall not delve into the technical details too much, but the first method I thought of was the frequentist method of using maximum likelihood estimators and possibly doing a hypothesis test. Sounds good right? But wait, does this give any useful information?

I've reached a point in my research now where we start considering Bayesian estimators. The SPM8 package is designed to do this - in fact Dr Nichols made some settings to use "classical" ie non-Bayesian estimators for the first simulation. So not much problem with the programming, pretty straightforward. Now the problem is, I've not done any Bayesian statistics in the first 2 years of MMORSE. So what's this all about? I was told that essentially all I need to know is Bayes Theorem and some easy manipulation/algebra. (Trust me, it's really nothing spectacular.)

So with this in mind, I started wondering how using a Bayesian approach would solve the question of a psychic cephalopod. I asked Guy today in the office and he briefly explained to me how it works. Again, Bayes theorem, sub in the required probabilities and a very rough estimation probably puts the probability at about 1 in a few hundred thousand. Hardly worth getting excited about. Will probably do some proper calculations and write-up in the near future.

I ended up spending most of the afternoon reading some articles/websites about the frequentist/Bayesian divide. Pretty interesting. I have to admit I'm turning Bayesian.

Funny how a question that seemed perfectly unrelated to my research turned out to have a lot in common eh?


July 15, 2010

Linux tips and tricks (2)

Say you are on a network computer and wish to know the system specs. You can use:

cat /proc/cpuinfo
cat /proc/meminfo

Which will return you information about the CPU and memory in the system. There are more files in /proc which will give you information.

Searching for number of instances of a string in a file:

e.g. grep 'Y =' *log|wc (to search for the string 'Y =' in all files ending with log. wc gives word count)

Clearing a file. Recall the standard output operator. Now use:

cat /dev/null > test2.log


July 13, 2010

Linux tips and tricks

From Dr Nichols on script files:

Make a script file, .sh
  test.sh
must begin "#!/bin/bash"
Give it execute permissions
chmod +x test.sh (Important! If not script will not run!)

and be sure to re-direct all output to a log file

Then when you run the script, put it in the background

  ./test.sh &

Here is my test.sh file

#!/bin/bash

matlab -nojvm -nodisplay < doit.m > test2.log 2>&1

Also, how to start up matlab and add path to matlab every login

Edit ./.bashrc, using say, emacs i.e. at the prompt type "emacs ./.bashrc"

Add the following lines:

module add matlab
export MATLABPATH=$MATLABPATH:$HOME/spm8/

for example, given that I put the spm8 files into /home/spm8/

Useful commands to view log files are cat, tail etc.


June 2021

Mo Tu We Th Fr Sa Su
May |  Today  |
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30            

Search this blog

Tags

Galleries

Most recent comments

  • Thanks a lot! That does seem to work better! by on this entry
  • You don't need to cat /dev/null into a file to empty it, you can just use > For example: me@mine:/tm… by Mike Willis on this entry

Blog archive

Loading…
RSS2.0 Atom
Not signed in
Sign in

Powered by BlogBuilder
© MMXXI