Solved – What are the odds of drawing 7 cards that end up sequential – from a 52 card deck? (7 card poker straight)

While playing a friendly game of Texas Hold'em poker, a player drew a 7 card straight. Although in texas hold'em a player may only use 5 of the possible 7 cards, the discussion about odds immediately came up. What are the odds of getting a 7 card straight? For those unfamiliar with poker, the question … Read more

Solved – Cosine angle calculation for the documents – Dissimilarity function not working in tm package in R

I want to find the document similarity. I am using the below R code read 1000 txt articles from directory data/txt corpus <-Corpus(DirSource("data/txt"), readerControl = list(blank.lines.skip=TRUE)); some preprocessing corpus <- tm_map(corpus, removeWords, stopwords("english")) corpus <- tm_map(corpus, stripWhitespace) corpus <- tm_map(corpus, stemDocument, language="english") creating term matrix with TF-IDF weighting terms <-DocumentTermMatrix(corpus,control = list(weighting = function(x) weightTfIdf(x, … Read more

Solved – Correlation between two Likert items with a non-monotonic relationship

One of the assumptions for Spearman correlation is that there is a monotonic relationship between the two variables. I've created a scatterplot for two Likert item variables, but it seems impossible to get the desired monotonic plot. Must the monotonicity assumption be met for me to calculate the Spearman correlation? My second question is, can … Read more

Solved – Problems plotting GLM data of binomial proportional data

This might be a question for the programmers, but I thought I would ask here first. Im comparing browsing pressure on plants between sites. Ive a value to indicate Browsing Pressure and count data of trees that have been damaged between locations. Ive been using Crawleys R example (page 574) regarding sex ratios and my … Read more

Solved – Simulating a Gaussian (Ornstein Uhlenbeck) process with an exponentially decaying covariance function

I'm trying to generate many draws (i.e., realizations) of a Gaussian process $e_i(t)$, $1leq t leq T$ with mean 0 and covariance function $gamma(s,t)=exp(-|t-s|)$. Is there an efficient way to do this that wouldn't involve computing the square root of a $T times T$ covariance matrix? Alternatively can anyone recommend an R package to do … Read more

Solved – Student t-distribution parameter/s and MLE

So I always thought of the Student t-distribution as having only 1 parameter, v, the degrees of freedom (as described by wikipedia). When I searched however on how to find the MLE of v I keep coming across questions mentioning mu and sigma as parameters as well. So 1) Is the Student-t Distribution a special … Read more

Solved – Repeated measures structural equation modeling

I need to analyse a dataset of clinical rehabilitation data. I am interested in hypothesis-driven relationships between quantified "input" (amount of therapy) and changes in health status. Although the dataset is relatively small (n~70) we have repeated data reflecting temporal changes in both. I am familiar with non-linear mixed effects modelling in R however am … Read more

Solved – Random Forests for predictor importance (Matlab)

I'm working with a dataset of approximately 150,000 observations and 50 features, using SVM for the final model. To trim down the feature count, I decided to look into using RF so SVM optimization doesn't take too long. I'm currently using the TreeBagger implementation in Matlab and had a few questions. When investigating feature importances, … Read more

Solved – Statistical test for normalised data

I am working with culture cells where one dish has been transfected with a scrambled knockdown clone and two dishes which have been transfected with two knockdown clones each knocking down the expression of a single gene. An example of an experiment I have performed is to measure the mitochondrial membrane potential (using a fluorescent … Read more