Posts Tagged ‘ Test ’

How to do a chi-square test in 7 steps

May 3, 2014
By
How to do a chi-square test in 7 steps

What is a chi-square test: A chi square tests the relationship between two attributes. Suppose we suspect that rural Americans tended to vote Romney, and urban Americans tended to vote Obama. In this case, we suspect a relationship between where you live and who you vote for. The full name for this test is Pearson’s […]

Read more »

Temperatures Series as Random Walks

February 12, 2014
By
Temperatures Series as Random Walks

Last year, I did mention in a post that unit-root tests are dangerous, because they might lead us to strange models. For instance, in a post, I did obtain that the temperature observed in January 2013, in Montréal, might be considered as a random walk process (or at leat an integrated process). The code to extract the data has changed (since the website has been updated), so here, we use…

Read more »

Unit Root Tests

February 12, 2014
By
Unit Root Tests

This week, in the MAT8181 Time Series course, we’ve discussed unit root tests. According to Wold’s theorem, if is  (weakly) stationnary then where is the innovation process, and where  is some deterministic series (just to get a result as general as possible). Observe that as discussed in a previous post. To go one step further, there is also the Beveridge-Nelson decomposition : an integrated of order one process, defined as…

Read more »

Logistic regression and categorical covariates

September 27, 2013
By
Logistic regression and categorical covariates

A short post to get back – for my nonlife insurance course – on the interpretation of the output of a regression when there is a categorical covariate. Consider the following dataset > db = read.table("http://freakonometrics.free.fr/db.txt",header=TRUE,sep=";") > attach(db) > tail(db) Y X1 X2 X3 995 1 4.801836 20.82947 A 996 1 9.867854 24.39920 C 997 1 5.390730 21.25119 D 998 1 6.556160 20.79811 D 999 1 4.710276 21.15373 A 1000…

Read more »

Playing cards in Vegas?

May 20, 2013
By
Playing cards in Vegas?

In a previous post, a few weeks ago, I mentioned that I will be in Las Vegas by the end of July. And I took the opportunity to write a post on roulette(s). Since some colleagues told me I should take some time to play poker there, I guess I have to understand how to play poker… so I went back to basics on cards, and shuffling techniques. Now, I…

Read more »

Comparing quantiles for two samples

March 8, 2013
By
Comparing quantiles for two samples

Recently, for a research paper, I some samples, and I wanted to compare them. Not to compare they means (by construction, all of them were centered) but there dispersion. And not they variance, but more their quantiles. Consider the following boxplot type function, where everything here is quantile related (which is not the case for standard boxplot, see http://freakonometrics.hypotheses.org/4138, in French) > boxplotqbased=function(x){ + q=quantile(x[is.na(x)==FALSE],c(.05,.25,.5,.75,.95)) + plot(1,1,col="white",axes=FALSE,xlab="",ylab="", + xlim=range(X),ylim=c(1-.6,1+.6)) +…

Read more »

Experimental Design: Problem Set

June 21, 2012
By
Experimental Design: Problem Set

QUESTIONS 1. The tensile strength of Portland cement is being studied. Four different mixing techniques can be used economically. The following data have been collected: (a) Test the hypothesis that mixing techniques affect the strength of the cement. Use $\alpha=0.05$. (b) Construct a graphical display as described in Section 3-5.3 to compare the mean tensile strengths for the four mixing techniques. What are your conclusions? (c) Use the Fisher LSD method with $\alpha=0.05$…

Read more »

Cochran Q Test for k related samples in R

February 1, 2012
By
Cochran Q Test for k related samples in R

To run the Cochran Q Test in R, we need to download the package of it first, since it is not built-in in R. The name of the package is RVAideMemoire authored by Maxime Hervé. Here's how to do it.Codes:Here we are installing the package named RVAideMem...

Read more »

Confirming SSR, SSE, and SST using matrix in R

February 1, 2012
By

The codes below was done in our regression laboratory class. Here, we run first the data in SPSS, and take the ANOVA output where we can find the computed values of SSR, SSE, and SST. #Al-Ahmadgaid Asaad#As part of the yearly report of the...

Read more »

Example: Two Sample t-Test

January 31, 2012
By

The recovery time (in days) is measured for 10 patients taking a new drug and for 10 different patients taking a placebo. We wish to test the hypothesis that the mean recovery time for patients taking the drug is less than for those taking placebo. The...

Read more »


Subscribe

Email:

  Subscribe