Friday, July 23, 2010

Analyzing the Self

Self. We lose sight of the abstract concept of self amidst the milieu of distraction surrounding us: inanimate things compete for our attention and we feel the urgency to run after them, with the illusion that they will provide some sort of fulfillment. A cell phone notifying us we have a text message; a family member talking in the background; an event or get-together that seems appealing and mind-opening; a thought about why I did what I did, about why he did what he did, about what he/she is thinking, about why it couldn't be different, the way I wanted. All of these things, both physical and mental, take away from the consciousness of self. when we are really conscious of self..nothing bothers us. everything is as it should be. we can appreciate how each moment is unfolding, rather than be irritated when the moment doesn't seem to provide us what we think we need to reach our illusory goal. the moment is as it should be.
The Self cannot be truly fulfilled from any amount of attention received from a man. The Self needs to be fulfilled by itself, because it is perfect without anything from the outside world.

Friday, March 6, 2009

Easy Statistical Analysis

OK, this post is for people in research, or anyone who has to use statistics at some point in their jobs. Hell, even if it's not for your job but you're just really curious to find out if there's a difference between two populations, like say people who prefer Coke to those who prefer fruit juice. You would start by taking a survey of a large representative number of individuals for the demographic you're interested in - say you want to know about everyone in the US regardless of age. Now, what are you looking for a difference in? Is it age? Gender? Existing health condition? Race? Location?




So you want to find the difference between two populations, say people who like coke as opposed to those who like fruit juice. You have data on a random sample of individuals, including age, gender, existing health conditions, race, and location of residence. You also know whether they prefer coke or fruit juice. These are all your variables, as they vary for each individual. Now you want to find out if there is a difference in the means of these variables for people who like coke versus those who like fruit juice.




First you need to numerize all your variables in the data set if they are strings. For example your gender variable has values 'male' and 'female', but to make it simple assign males as 1 and females as 2. You can do this using the RECODE command(shown below):



RECODE
drinkpref
(coke= '1')(fruit juice= '2')
into drinkprefnum.
execute.






Independent Samples T-Test

Let's start with gender. This one's easy because gender can only be one of two choices(hopefully). That's called a dichotomous variable, because it can only have 2 values. Once you've recoded that the way you want(i.e. male= 1, female= 2, or vice versa) you can start your analysis. In this case, you'd want to run an Independent Samples t-test to determine if there is a difference in gender for people who like coke as opposed to those who like fruit juice. Let's say you are using an SPSS platform. You would go to Analyze--Compare Means--Independent Samples T-test.


Your test variable is what you're looking to find a difference in - gender. Your grouping variable is how you want to group the individuals - based on drink preference, right? Here's what your screen would look like:






Click OK.
In your output, you get a table called Group Statistics. You can look at the mean genders for your two groups there. You can't make any deductions from it, but it's good to have the numbers.
Your next table is the actual statistical test.
The first part is Levene's Homogeneity of Variances test. This tests if the variances of your two groups are comparable to lend validity to your t-test. Basically, you want the significance here to be greater than .05, so that your results are valid.
Assuming it is, look at your t-test in the next column under "Sig." If the value in the first row is less than .05, you can be 95% confident that there is a difference between the two groups in GENDER. In other words, you've proved the hypothesis that there IS a difference in gender between people who like coke as opposed to those who like fruit juice.
One-way ANOVA
Now let's say we have another variable that tells us what soda our surveyed people prefer the most between Coke, Sprite, Mountain Dew, and Slice. We know from before how to recode these so we'll assign Coke - 1, Sprite - 2, Mountain Dew - 3, Slice -4. OK OK, you need a refresher? Here's the recode command and the way we would code this, you lazy bum:
RECODE
sodapref
('Coke'= '1') ('Sprite'= 2)('Mountain Dew'= 3)('Slice'= 4)
into sodaprefnum.
execute.
Now let's look at if soda preference differs based on age. Soda preference has more than 2 groups, so we'll need to run an ANOVA to compare ages across all these groups. Age is a continuous variable, as it can have any number of possible values(18-100, for example). If we want to compare drink preference across all of these ages we'll have a huge analysis and won't be able to make much of it. So, it's better to put our ages into categories. Here's an example of how we would recode:

RECODE
age
(18 thru 25 = 1) (26 thru 35= 2)(36 thru 45 = 3)(46 thru 55 = 4)(56 thru 65 = 5)(65 thru 100 = 6)
into agecat.
execute.
Now we have 6 different age categories that we can compare across. So let's run an ANOVA on SPSS: Go to Analyze--Compare Means--One-way ANOVA. Put in your dependent variable - sodaprefnum. Then put in your factor, agecat. Click Options--Homogeneity of Variance test and Descriptives. Then click OK.
Your first table will be your descriptives, where you can look at the means for all of your groups. The second table is your homogeneity of variance test - again, make sure that the significance is greater than .05 or your test is not valid and your ANOVA can't be trusted.
Finally, the meat of all of it, the third table gives you your ANOVA results. Look at your significance, if it's less than .05, you're golden - you've found that there is a difference in soda preference based on age. Now let's say you want to dig deeper, specifically, what age groups differ the most? Go back to your One-way ANOVA dialog via Analyze--Compare Means--One-way ANOVA, and click Post-hoc tests. Then click on LSD under Equal Variances Assumed, and click Continue. Then click OK and let the test run. Scroll down on your output and you can see an analysis of all age groups against eachother. Your first row has age group 1 compared with all other age groups, your second row has age group 2 compared with all other age groups, and so on. The ones that have a * asterisk next to them are significantly different.

Introduction to this blog

I'm a fan of streamlining and shortcuts. This blog is for those of you who are like me, who want to learn about things quickly and easily and just learn enough to be able to apply them to your lives. We're not trying to do our PhDs in the subject; we just want to be able to use it, or at the very least write it in our resume. For those of you who don't like having to sift through long content websites to get the info you need, this is the place for you.

A little about me: I'm a market research analyst in the Washington DC area. I have a lot of down time at my job where I get to waste time on the Internet. I decided that instead of watching movies on YouTube for hours, I would learn a new skill everyday and then teach it to others using this blog. Anything else you want to know? Just ask.