Descriptive Statistics - Some More Visualization Tools

This is the third of three posts in Descriptive Statistics. Click here to see the full list of statistics posts.

Matlab Logo

Since we finished up descriptive statistics last time, it might be useful to briefly mention a few ways of visualizing datasets. If you’re like me, you don’t get much inspiration from a list of numbers on the page, but seeing them plotted really helps to tell their story. Here are a few examples that I use frequently. If you use others, please share them in the comments below so the rest of us can try them out.

Contents

Boxplot

We already dissected the boxplot and what its parts mean back in the first post on descriptive stats, but I still think they’re cool. Of note here is how you can throw boxplot a matrix, and it gives each column its own box. (download the .mat file here)

load fudge.mat;
h1 = figure('Position',[100 100 600 400],'Color','w');
boxplot(fudgedata,'notch','on');

Stat Pic 1
Continue Reading »

delicious bookmark StumbleUpon technorati Digg reddit icon rss icon

Monday Math Madness #12: The Martian Problem

The Problem Statement

The Martian Problem

Tired of the Earth obstructing his view of Venus, Marvin the Martian desires to destroy the Earth with his Illudium Q-36 Explosive Space Modulator. The only thing stopping him is his distant cousin Jeffrey’s belief that there are intelligent life forms on Earth. In order to show Marvin that there are indeed intelligent lifeforms, Jeffrey and Marvin travel to earth and approach two mathematicians with the following problem:

Jeffrey: I am thinking of two numbers X and Y in my head. Both X and Y are positive integers greater than 2 and less than 99. I am going to tell Dan the sum of these two number; similarly, I will tell Quan the product of these two numbers. Without telling each other what I have told you, can you tell me what the two numbers X and Y are?

Dan and Quan stare at each other for a bit. Shortly thereafter, Dan and Quan have the following conversation between them:

Dan: Quan, you don’t know what X and Y are.
Quan: That was true, Dan, but now I do!
Dan: Hmmmmmmmmmmmm. And now I do, too!
Both: X and Y are _ and _!

What are X and Y?
Continue Reading »

delicious bookmark StumbleUpon technorati Digg reddit icon rss icon

MATLAB - Windowing Part 1

This is the sixth post in the blinkdagger signal processing series.

Matlab Logo Windowing is a valuable technique that is used primarily to reduce/redistribute sprectral leakage (error in the fft measurement) to better represent the frequency spectrum of the data. In addition, windowing can make it easier to identify peaks at specific frequencies, and can help in accurately indicating the amplitude level of a peak. One of the quirks of using the fft command is the implied periodicty of the input signal. If your signal doesn’t end and start at the same value, then this can lead to spectral leakage in the fourier transform. In this tutorial, we will explain what spectral leakage is, why it occurs, and how windowing can help resolve this problem.

Contents

What is Spectral Leakage?

Spectral leakage refers to the small amounts of signal energy that are observed in frequency components that do not exist in the original waveform. How does spectral leakage come about? Let’s quickly investigate this matter. Let’s start with a sine wave that has fundamental frequency at 10 Hz.

y(t)=2sin(2pi{f}_{o}t)

Example Sine Wave #1 with Frequency Spectrum

fo = 10;   %frequency of the sine wave
Fs = 200; %sampling rate
Ts = 1/Fs; %sampling period
t1 = 0:Ts:1 - Ts; %time vector
n1 = length(t1); %number of samples

y1 = 2*sin(2*pi*fo*t1);
%plot the curve in the time domain
sinePlot1= figure;
plot(t1,y1)  %plot the sine wave

Sine Wave #1
Continue Reading »

delicious bookmark StumbleUpon technorati Digg reddit icon rss icon

MATLAB - Tips and Tricks on Creating Better Figures and Plots

Matlab Logo In this tutorial, you will learn some useful tricks in generating plots. When I first started using MATLAB, I would always generate plots from the command prompt. After manually naming the x-axis, y-axis, and the title, resizing the plot to the perfect size, and making mods through the Plot Editor, I would paste it into my presentation or report. 95% of the time, I would find myself generating that same plot again because I plotted the wrong data, named the axes incorrectly, zoomed in on the wrong part of the plot, etc.

When we generate plots here at blinkdagger, we always use an m-file to control how we want the plot to look. That way, changes can easily be made. Yes, it’s possible to just manually add in x labels, y labels, titles, legends, and so on. But what happens if you close the figure, or need to make modifications to it later? This is why it’s helpful to do all your modifications through MATLAB commands! In this post, we’ll go over some useful commands when generating plots.

Contents

Example Plot

The following code generates a plot of Blinkdagger’s income as a function of time. It labels the x-axis, y-axis, provides a title, and adds a grid for easy viewing. What can we do to modify this plot to make it more aesthetically pleasing?

t = 0:0.2:10;  %sample interval
x = 0:length(t)-1; %sample data
y = sin(t) - t.^3 + 5*t.^2 + 10*t;  %generated data set

myPlot1 = figure; %create a new figure named myPlot1
plot(x,y); %plot the data
title('Blinkdagger Daily Income') %plot the data
xlabel('Day') %label the xaxis
ylabel('Income Earned') %label the yaxis
grid %add a grid to the plot

picture01

Continue Reading »

delicious bookmark StumbleUpon technorati Digg reddit icon rss icon

Listchecker Mega Tutorial by Krkljator.CF

This guide is written by Krkljator.CF

I recommend using Mozilla Firefox for browsing this website.

Introduction

Listchecker (pkp.listchecker) or just LC (as in further text) is very good piece of software which allows playing Warcraft III games (especially DotA) on Battle.net with much lowered or even no delay (in contrast to standard battle.net delay which ranges from about 0.5 to 1.0 second!)

I wrote this tutorial as my big contribution to LC! My intention is to spread LC as much as I can and, of course, help people to configure it and solve all common problems. Hopefully, I will make some new DotA LC hosts! But, if you are beginner (noob) at DotA, please DO NOT host any DotA games. No one wants noob DotA hosts!

I have been using LC for about a year now and it works perfectly as since I first installed it. However, it takes some time to configure, but it is worth of effort. I will explain basic options, although the initial guide by Quan Quach is very helpful for using LC too. So, if you are new to LC, I suggest to read the initial guide first –> Listchecker Part I.

Continue Reading »

delicious bookmark StumbleUpon technorati Digg reddit icon rss icon

« Prev - Next »