instruction stringlengths 35 38.7k |
|---|
I need to update the failure rate (given as deterministic) based on new rate of failure about the same system (it is a deterministic one too). I read about conjugate priors and Gamma distribution as a conjugate for the Poisson process.
Also, I can equate the mean value of Gamma dist. ($\beta/\alpha$) to the new rate (... |
I have values from 4 different methods stored in the 4 matrices. Each of the 4 matrices contains values from a different method as:
Matrix_1 = 1 row x 20 column
Matrix_2 = 100 rows x 20 columns
Matrix_3 = 100 rows x 20 columns
Matrix_4 = 100 rows x 20 columns
The number of columns indicate the number of years. ... |
The wikipedia page claims that likelihood and probability are distinct concepts.
In non-technical parlance, "likelihood" is usually a synonym for "probability," but in statistical usage there is a clear distinction in perspective: the number that is the probability of some observed outcomes given a set of parameter va... |
Imagine
having a dependent variable $Y$ that is a proportion (i.e., the proportion of observations made at the given time point that satisfy a condition, where each time point involves 50 to 250 observations)
$Y$ is measured at a series of time time points $X$, where $X = 1, 2, 3, ...$, typically to around 400.
At ini... |
I'm working with a panel dataset, I've used many models,
homogeneous (fixed effect, pooled ols and Driscoll and Kraay)
heterogeneous (swamy random coefficients) and would like to do a
post-estimation to select the model that best fit my regression.
Is there any method, command that may allow me to do this?
Any hint ... |
I am doing some basic fitting of data and exploring different fits. I understand that the residual is the difference between the sample and the estimated function value. The norm of the residuals is a measure of the deviation between the correlation and the data. A lower norm signifies a better fit.
Suppose a cubic fi... |
When given samples of a discrete random variable, the entropy of the distribution may be estimated by $- \sum \hat{P_i} \log{\hat{P_i}}$, where $\hat{P_i}$ is the sample estimate of the frequency of the $i$th value. (this is up to a constant determined by the base of the log.) This estimate should not be applied to obs... |
There are 100 people in a room.
What are the odds at least 1 person is born in January?
What is the best way to calculate this?
I used Binomial Distribution.
$E(x) = np = 100 \frac{1}{12} = 8.3$
$std.dev. = \sqrt{npq} = 2.76$
$Z(\text{1 person}) = (1 - 8.3) / 2.76 = -2.64$
$p = P(Z<-2.64) = .004$ or $.4%$ odds that les... |
We want to work out a value for "Average time in service" for our users.
However, as we have many subscribers still active, how can we do that? If we just look at average time of deactivated subscribers, that won't show the picture.
Is there some "correct" way to do this? We know our churn rate by month, so maybe we n... |
Car analogy:
Assume the traffic (number of cars per hour) on a road has a Poisson distribution, and the time between cars has the matching exponential distribution. If the chance of each car being red is independent from both time and the color of other cars, will the number of red cars per hour also have a Poisson dis... |
I am using g*power to calculate the a priori power for a 2 group repeated measures anova with a continuous dependent variable with 3 time points. I think that higher values for the "correlation among rep measures" should indicate a better test (i.e., high test-retest correltaion) and thus yield better power and a lowe... |
Help me here, please. Perhaps before even giving me an answer you may need to help me ask the question. I have never learned about time series analysis and do not know if that is indeed what I need. I have never learned about time smoothed averages and do not know if that is indeed what I need. My statistics background... |
I have a dataset where I need to do linear regression. Unfortunately there is a problem with heteroscedasticity. I´ve rerun the analysis using robust regression with the HC3 estimator for the variance and also done bootstrapping with the bootcov function in Hmisc for R. The results are quite close. What is generally re... |
I'm doing this only for learning purposes. I've no intentions of reversing the methods of IMDB.
I asked myself I owned IMDB or similar website. How would I compute the movie rating?
All I can think of is Arithmetic Mean
For a movie data provided below computation would be
(38591*10 + 27994*9 + 32732*8 + 17864*7 + 736... |
In today's pattern recognition class my professor talked about PCA, eigenvectors and eigenvalues.
I understood the mathematics of it. If I'm asked to find eigenvalues etc. I'll do it correctly like a machine. But I didn't understand it. I didn't get the purpose of it. I didn't get the feel of it.
I strongly beli... |
I'm trying to calculate how good are my measurements in machine learning! Let's say that I have five choices, and that error is 4, 2, 0.002, 3, 6. Naturally, I will pick third one for the hit, but I would like to say following:
I'm X% certain that hit is third pick
I'm Y% certain that hit is first (last) pick
Of co... |
I like G van Belle's book on Statistical Rules of Thumb, and to a lesser extent Common Errors in Statistics (and How to Avoid Them) from Phillip I Good and James W. Hardin. They address common pitfalls when interpreting results from experimental and observational studies and provide practical recommendations for statis... |
I have a (symmetric) matrix M that represents the distance between each pair of nodes. For example,
A B C D E F G H I J K L
A 0 20 20 20 40 60 60 60 100 120 120 120
B 20 0 20 20 60 80 80 80 120 140 140 140
C 20 20 0 20 60 80 80 80 120 140 140 140
D 20 20 20 0 ... |
Is there a way to have R plot to an in-memory object or connection, rather than a named file?
I would like to have a plotting server create many graphs without ever going to a file.
The Cairo package documents use of a connection, but it doesn't seem to work. What I would like to do is something like:
library(Cairo)
p... |
I am clustering a dataset using the pam command (from {cluster} package), and I wish to decide on the number of clusters to use.
I was able to implement The_Elbow_Method in R (see wiki) for doing that. But that doesn't provide me with any solid criteria (like AIC, for example) for decision.
I came by the {clValid} pac... |
I am running experiments for a paper and I am looking for an interesting book / website to understand properly how ANOVA and ANCOVA work. I have a good math background so I don't necessarily need a vulgarized explanation.
I'd also like to know how to determine when to use ANOVA instead of ANCOVA.
|
Can someone give a concise, layman's explanation of an "If-Then" rule (as in rule-based systems). I am finding this term used frequently without anyone really defining it properly.
|
Several statistical packages, such as SAS, SPSS, and R, allow you to perform some kind of factor rotation following a PCA.
Why is a rotation necessary after a PCA?
Why would you apply an oblique rotation after a PCA given that the aim of PCA is to produce orthogonal dimensions?
|
I am attempting to calculate Cohen's d and then pool those estimates into a summary effect size. Can anyone help? (Stata or SPSS software owned).
|
I would like to be able to efficiently generate positive-semidefinite (PSD) correlation matrices. My method slows down dramatically as I increase the size of matrices to be generated.
Could you suggest any efficient solutions? If you are aware of any examples in Matlab, I would be very thankful.
When generating a PSD ... |
I am attempting to find a program that will let me conduct Cox regression on my matched case-control dataset.
Please assist.
p.s. I have STATA, SPSS, and MedCalc
|
I am attempting to calculate Orwin's (1983) modification of Rosenthal's (1979) Fail-safe N for my meta-analysis of Odds Ratios.
However, all the equations I am finding are using Cohen's d, which I cannot calculate (I don't have two groups).
I have STATA, SPSS, and MedCalc at my disposal.
|
I was asked such a question as "Did you do any consistency check in your daily work?" during a phone interview for a Biostatistician position. I don't know what to answer. Any information is appreciated.
|
I'm an undergraduate statistics student looking for a good treatment of clinical trials analysis. The text should cover the fundamentals of experimental design, blocking, power analysis, latin squares design, and cluster randomization designs, among other topics.
I have an undergraduate knowledge of mathematical stati... |
In two papers in 1986 and 1988, Connor and Korajczyk proposed an approach to modeling asset returns. Since these time series have usually more assets than time period observations, they proposed to perform a PCA on cross-sectional covariances of asset returns. They call this method Asymptotic Principal Component Analys... |
Context:
Imagine you had a longitudinal study which measured a dependent variable (DV) once a week for 20 weeks on 200 participants. Although I'm interested in general, typical DVs that I'm thinking of include job performance following hire or various well-being measures following a clinical psychology intervention.
I ... |
It was recommended to me on the User Interface Stack Exchange that I also ask this question here. So....
I'm currently rebuilding our entire intranet from scratch, mostly because the tech behind is out-dated and it has been proved that a lot of information is difficult to find.
Though that is beside the point, what I a... |
I hope you all won't mind a basic question.
We are examining the effects of a compound at various concentration on the behaviour of an organism. The compound is administered once at the beginning of the time course. Observations are made every minute for a period of 2 hours. Each concentration is applied to 12 indiv... |
I know the significance of the slope of a LMS linear regression can be calculated using the r2 coefficient of determination and looking up the appropriate value in an F table. However, I was thinking of perhaps making this "more robust" by replacing the LMS linear regression with a repeated median straight line fit, an... |
I previously asked this on StackOverflow, but it seems like it might be more appropriate here, given that it didn't get any answers on SO. It's kind of at the intersection between statistics and programming.
I need to write some code to do PCA (Principal Component Analysis). I've browsed through the well-known algorit... |
I have p values from a lot of tests and would like to know whether there is actually something significant after correcting for multiple testing. The complication: my tests are not independent. The method I am thinking about (a variant of Fisher's Product Method, Zaykin et al., Genet Epidemiol, 2002) needs the correlat... |
I've just been given a stack of polling data to analyse. Some of the questions are obviously leading or present subtle incentives (for the poller or polled) for specific answers. Of other questions I'm not so sure but I have some doubts. I'm also starting to question other factors about how the poll was conducted (envi... |
A few months ago I posted a question about homoscedasticity tests in R on SO, and Ian Fellows answered that (I'll paraphrase his answer very loosely):
Homoscedasticity tests are not a good tool when testing the goodness of fit of your model. With small samples, you don't have enough power to detect departures from ho... |
How can we compare complexity of two models with the same number of parameters?
Edit 09/19: To clarify, model complexity is a measure of how hard it is to learn from limited data. When two models fit existing data equally well, a model with lower complexity will give lower error on future data. When approximations are ... |
Example code:
(pc.cr <- princomp(USArrests))
summary(pc.cr)
loadings(pc.cr) ## note that blank entries are small but not zero
I am getting different outputs from each, and I am not sure I understand what the difference is.
Here is the output:
> summary(pc.cr)
Importance of components:
Com... |
I have read and seen a lot of Parallel coordinates plots. Can someone answer the following set of questions:
What are parallel coordinates plots (PCP) in simple words, so that a layman can understand?
A mathematical explanation with some intuition if possible
When are PCP useful and when to use them?
When are PCP not ... |
I have a static panel data model with small T (T=5) that makes it impossible for me to use granger causality as it requires a long time span.
So my question:
Is there any alternative solution to test for causation even in a small T context?
Any hint will be highely appreciated!
|
The biological data is listed as following:
V1 V2 V3 V4 V5 V6
0.064 0.014 0.016 0.012 0.013 0.023
0.056 0.000 0.000 0.008 0.010 0.000
0.042 0.014 0.024 0.008 0.017 0.023
0.031 0.014 0.016 0.008 0.013 0.023
0.068 0.000 0.008 0.004 0.020 0.000
0.081 0.000 0.000 0.004 0.010 0.000
0.060 0.014 0.016 0.006... |
Dear all,
I was encouraged to ask this question here as well as on stackoverflow and would be very appreciative of any answers...
Due to hetereoscedasticity I'm doing bootstrapped linear regression (appeals more to me than robust regression). I'd like to create a plot along the lines of what I've done in the script he... |
We know that the projection matrix learned by PCA can be applied to out-of-sample data points to get their low-dimensional embedding. However, how reliable are these embeddings expected to be, as compared to the embedding obtained from PCA with these out-of-sample points combined with the original data?
Consider this ... |
I want to assess item-total correlations on a 19-item questionnaire (some of the questions are meant to be reverse-scored). My question is:
Do I reverse score the items PRIOR to calculating the item-total correlations (in order to eliminate any variables that do not correlate with the total at >.40)?
Additionally,... |
My friend and I are working on a project on distributed datastructures. We were wondering how much is nearest neighbor information used in modern recommendation systems and whether it would be worthwhile to work on a distributed datastructure (say a kd-tree) for that purpose.
Thanks
|
As title, I am thinking of merging both into "missing data", which is to name it as NA in R. Since I don't see it will make much sense (or even any sense), to separate the "don't know" row out and to compare the information with other rows.
Is it OK for me to do so?
|
I'm looking for a simple way to store ratios.
For a time component, I must store the average ratio between two behavior. For example the number of people that turn left compared to the number of people that turn right.
I have to detect unusual behavior (people that turn right abnormally).
How should I mathematically co... |
What is your intuition / interpretation of a distribution of eigenvalues of a correlation matrix? I tend to hear that usually 3 largest eigenvalues are the most important, while those close to zero are noise. Also, I've seen a few research papers investigating how naturally occuring eigenvalue distributions differ from... |
It is usual to use second, third and fourth moments of a distribution to describe certain properties. Do partial moments or moments higher than the fourth describe any useful properties of a distribution?
|
I am trying to estimate the mean of a more-or-less Gaussian distribution via sampling. I have no prior knowledge about its mean or its variance. Each sample is expensive to obtain. How do I dynamically decide how many samples I need to get a certain level of confidence/accuracy? Alternatively, how do I know when I can ... |
I am attempting to estimate a model of the following form:
W = alphaH * H + alphaM * M + alphaL * L + X * beta
where H, M, L are indicators for a discrete choice variable, and beta is something like 35-dimensional. Because we believe our data/model has endogeneity issues, we have expanded the model to
W = alphaH * H'... |
Nassim Taleb, of Black Swan fame (or infamy), has elaborated on the concept and developed what he calls "a map of the limits of Statistics". His basic argument is that there is one kind of decision problem where the use of any statistical model is harmful. These would be any decision problems where the consequence of m... |
I am interested in the distribution of the maximum drawdown of a random walk: Let $X_0 = 0, X_{i+1} = X_i + Y_{i+1}$ where $Y_i \sim \mathcal{N}(\mu,1)$. The maximum drawdown after $n$ periods is $\max_{0 \le i \le j \le n} (X_i - X_j)$. A paper by Magdon-Ismail et. al. gives the distribution for maximum drawdown of a ... |
We often hear of project management and design patterns in computer science, but less frequently in statistical analysis. However, it seems that a decisive step toward designing an effective and durable statistical project is to keep things organized.
I often advocate the use of R and a consistent organization of file... |
When you are the one doing the work, being aware of what you are doing you develop a sense of when you have over-fit the model. For one thing, you can track the trend or deterioration in the Adjusted R Square of the model. You can also track a similar deterioration in the p values of the regression coefficients of th... |
I am talking about the regression method that measures the impact of several layers of independent variables upon a dependent variable.
|
Background
I am conducting a meta-analysis that includes previously published data. Often, differences between treatments are reported with P-values, least significant differences (LSD), and other statistics but provide no direct estimate of the variance.
In the context of the model that I am using, an overestimate of ... |
Are Lorenz curves and QQ-plots the same? If not, where are the differences? I read about both of them and they appear to be two terms for the same type of plot / statistical technique to compare distributions. I was not able to find any confirmatory source for this. Perhaps you know?
|
Suppose that we want to generate a draw from the following distribution:
$P(X=0) = 0.5$
$P(X=1) = 0.5$
There are two constraints though:
(a) The draw has to be on the basis of an external event.
(b) Related to (a), the draw must be verifiable by a third party. In other words, a third party should be able to verify that... |
Does the use of metric spaces to describe the support of a random variable provide any greater illumination? I ask this after reading about how metrics spaces have been used to unify the mathematical measure theoretic nature of probability and the physical intuition that most associate with probability. You can read my... |
I have distributional data which I represent as a density. The data represents frequencies of user activities on a computer screen (e.g. amount of clicks on the y or x-axis of that screen but also other activities that can be related to coordinates and can therefore be binned by those coordinates (e.g. 5 pixels bins)).... |
The qq-plot can be used to visualize how similar two distributions are (e.g. visualizing the similarity of a distribution to a normal distribution, but also to compare two artibrary data distributions). Are there any statistics that generate a more objective, numerical measure that represent their similarity (preferabl... |
I'm wondering if someone could suggest what are good starting points when it comes to performing community detection/graph partitioning/clustering on a graph that has weighted, undirected edges. The graph in question has approximately 3 million edges and each edge expresses the degree of similarity between the two vert... |
I am trying to determine significant differences between groups of data using a k-nearest neighbor randomization test in R. This test basically looks for similarity amongst homogenous groups and separates them out using random clustering. In the literature, this test is called a "K-nearest neighbor (kNN) randomization ... |
I'm the author of the ez package for R, and I'm working on an update to include automatic computation of likelihood ratios (LRs) in the output of ANOVAs. The idea is to provide a LR for each effect that is analogous to the test of that effect that the ANOVA achieves. For example, the LR for main effect represents the c... |
The Gauss-Markov theorem tells us that the OLS estimator is the best linear unbiased estimator for the linear regression model.
But suppose I don't care about linearity and unbiasedness. Then is there some other (possible nonlinear/biased) estimator for the linear regression model which is the most efficient under the... |
I know the value for the 16% quartile, so I know the additive deviation for the given distribution. How do I find the deviation of the log of the given distribution on a multiplicative scale?
|
The statistics book I am reading recommends omega squared to measure the effects of my experiments. I have already proven using a split plot design (mix of within-subjects and between-subjects design) that my within-subjects factors are statistically significant with p<0.001 and F=17.
Now I'm looking to see how big is ... |
Context
you have 200 observations of an individual's running time for the 100 metres measured once a day for 200 days.
Assume the individual was not a runner before commencement of practice
Based on the observed data and the 199 other observations, you want to estimate the latent time it would take the individual to r... |
If you fit a non linear function to a set of points (assuming there is only one ordinate for each abscissa) the result can either be:
a very complex function with small residuals
a very simple function with large residuals
Cross validation is commonly used to find the "best" compromise between these two extremes. Bu... |
A little while back, J.M. suggested using the Stewart algorithm for generating $n$ by $n$ pseudo random orthogonal matrices in $O(n^2)$ time. He further noted that this methodology is implemented in Nick Higham's matrix computation toolbox (matlab). Now this package contains a bunch of .m files. Could anyone direct me ... |
How do I detrend or normalize multiple series of data so that I can inter-compare between the series?
Specifics below may not be appropriate for this forum. Please let me know and I can remove or re-phrase, but I think it might be helpful to fully understand the generic question above.
I have a data set that I would ... |
Questions:
I have a large correlation matrix. Instead of clustering individual correlations, I want to cluster variables based on their correlations to each other, ie if variable A and variable B have similar correlations to variables C to Z, then A and B should be part of the same cluster. A good real life example of... |
With the help of several people in this community I have been wetting my feet in clustering some social network data using igraph's implementation of modularity-based clustering.
I am having some trouble interpreting the output of this routine and how to use it to generate lists of members of each community detected.
T... |
I am trying to summarize what I understood so far in penalized multivariate analysis with high-dimensional data sets, and I still struggle through getting a proper definition of soft-thresholding vs. Lasso (or $L_1$) penalization.
More precisely, I used sparse PLS regression to analyze 2-block data structure including ... |
How does one calculate the sample size needed for a study in which a cohort of subjects will have a single continuous variable measured at the time of a surgery and then two years later they will be classified as functional outcome or impaired outcome.
We would like to see if that measurement could have predicted the b... |
So let's say you have a distribution where X is the 16% quantile. Then you take the log of all the values of the distribution. Would log(X) still be the 16% quantile in the log distribution?
|
An anonymous reader posted the following question on my blog.
Context:
The reader wanted to run a factor analysis on scales from a questionnaire - but the data was from paired husbands and wives.
Question:
Can factor analysis be run on dyadic data? If so, how?
Would the independence assumption hold for factor analy... |
I understand that for certain datasets such as voting it performs better. Why is Poisson regression used over ordinary linear regression or logistic regression? What is the mathematical motivation for it?
|
I just loaded a csv file in R. When I ran the summary command for one of the columns, I got the following:
> Error: unexpected symbol in "summary k_low"
I'm pretty sure I know what the 'unexpected symbol' is: for observations in which we had no reliable data for the variable k_low, we simply entered a period, or a . ... |
Imagine you have a study with two groups (e.g., males and females) looking at a numeric dependent variable (e.g., intelligence test scores) and you have the hypothesis that there are no group differences.
Question:
What is a good way to test whether there are no group differences?
How would you determine the sample si... |
I have a matrix where a(i,j) tells me how many times individual i viewed page j. There are 27K individuals and 95K pages. I would like to have a handful of "dimensions" or "aspects" in the space of pages which would correspond to sets of pages which are often viewed together. My ultimate goal is to then be able to comp... |
I have a vector of values that I would like to report the average in windows along a smaller slide.
For example, for a vector of the following values:
4, 5, 7, 3, 9, 8
A window size of 3 and a slide of 2 would do the following:
(4+5+7)/3 = 5.33
(7+3+9)/3 = 6.33
(9+8)/3 = 5.67
And return a vector of these values:
5.33... |
I'm examining some genomic coverage data which is basically a long list (a few million values) of integers, each saying how well (or "deep") this position in the genome is covered.
I would like to look for "valleys" in this data, that is, regions which are significantly "lower" than their surrounding environment.
Note... |
I'm investigating the effect of a continuous variable A on a measurement variable M stratified by another factor variable C in an observational dataset.
Due to heteroscedasticity I decided to use a bootstrapped regression analysis. However looking at the data, the background set of variables are not evenly distributed... |
Does Lin's concordance correlation coefficient assume that the 2 data sets have linear or monotonic tendencies? Or, can I measure the concordance between 2 data sets that have a sinusoidal tendency?
|
Is there a statistical procedure that can measure the concordance between two sets of data that have, say, a sinusoidal tendency?
|
I have the test results of a blood test administered to 2500 people four times at six-month intervals. The results primarily consist of two measures of immune response - one in the presence of certain tuberculosis antigens, one in the absence. Currently, each test evaluates to either positive or negative based on the... |
Among Matlab and Python, which language is good for general statistical data analysis? What are the pros and cons, other than accessibility, for each?
|
You so often come across in the press various studies that conclude directionally opposite results. Those can be related to the testing of a new prescription drug or the merit of a specific nutrient or anything else for that matter.
When two such studies arrive at conflicting results how can you tell which one of the... |
This is a follow-up to a Stackoverflow question about shuffling an array randomly.
There are established algorithms (such as the Knuth-Fisher-Yates Shuffle) that one should use to shuffle an array, rather than relying on "naive" ad-hoc implementations.
I am now interested in proving (or disproving) that my naive algor... |
Currently I'm analysing around 300 items in the field of education.
I'm interested in the dimensionality of the dataset. So I compute a matrix of tetrachoric correlation. The goal is to do a factor analysis on this matrix.
By curiosity I compare to a matrix of Pearson correlation, and the results are different. When I ... |
I've seen a little bit here about the difference between statistical inference for random samples, and what happens when we actually have population data. Most arguments seem to suggest you "never actually have the population" and the population data you think you have represents some unobservable super population whic... |
I previously asked how to estimate the latent potential of a runner who ran the 100 metres each day for 200 days. Latent skill was defined as "the latent time it would take the individual to run if they (a) applied maximal effort; and (b) had a reasonably good run for them (i.e., no major problems with the run; but sti... |
When trying to assess a validity of a claim relying on statistics, I was taught (in the school of epidemiology) that the scale to use is “the pyramid of evidence“
However, when conducting a discussion in the field of economics or political science, it is often very difficult (to impossible) to recreate a political sit... |
I like introducing probability by discussing the Boy or Girl or Bertrand paradox.
What other (short) problem/game provides a motivating introduction to probability? (One answer per response, please)
P.S. This is about a gentle introduction to probability, but in my opinion it is relevant for statistics teaching as it a... |
I wanted to find out what kind of different usages of stochastic processes theory in EE & CS are out there. For example, I find these kinds of usages interesting:
using stochastic signal as carrier that is modulated by the information signal for communication
using stochastic process analysis for improving photographe... |
For my thesis I am implementing a tracking algorithm that tracks clusters of datapoints.
However, I have a hard time finding research papers and/or an overview of commonly used algoritms in this subject.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.