All entries for July 2010
July 17, 2010
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
Say you are on a network computer and wish to know the system specs. You can use:
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
From Dr Nichols on script files:
Make a script file, .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
Here is my test.sh file
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
for example, given that I put the spm8 files into /home/spm8/
Useful commands to view log files are cat, tail etc.