1
vote
1answer
37 views

Expected peak to trough calculation

I am having trouble coding up in R equation 3.1 in the following paper: http://www.intelligenthedgefundinvesting.com/pubs/rb-cb.pdf My function: ...
1
vote
1answer
56 views

Z test of coefficients of output?

I have fitted a certain ARMA model and got the following output: As you can see, some coeff were set to zero and the focus is on the ma5 coeff and the intercept. To be exactly, the ma5 coeff is ...
2
votes
1answer
40 views

Is there a function to check a set of events/random variables are mutually independent?

Say, 5 random variables A,B,C,D,E which can take values either 0 or 1. I have the theoretical population chances for the 32 cases of P(A,B,C,D,E). Obviously they add up to 1. How to check if ...
1
vote
2answers
157 views

Using R for dice probabilities

Using R, what function(s) would I use to obtain the following probabilities? Roll at least one 1 when rolling 2 six-sided dice (2d6) = 11/36 Roll at least one 1 when rolling 3 six-sided dice (3d6) ...
2
votes
1answer
94 views

Overlapping sets (3) - significance test

Sorry if this appears to be a naive question! I have three overlapping sets and I want to find the probability of finding a larger/greater intersection for 'A intersect B intersect C' (in the example ...
2
votes
1answer
54 views

Probability distribution for varying probabilities in R

I'd like to plot the probability distribution for a set of binomial trials in R, the catch is that each trial has an independent probability of success (which I have in vector form). So, in R if I ...
5
votes
0answers
112 views

How to calculate the probability of absence for a certain category of artefacts from a sample, given prior knowledge about its abundance?

In archaeology, artefacts are commonly classified in categories according to certain criteria (those may include manufacturing technique, decoration, function, chronology, etc). I am trying to ...
3
votes
2answers
152 views

Suppose that $R^2=0$ . Does this imply that Y and X are unrelated? [duplicate]

Possible Duplicate: Under what conditions does correlation imply causation? Can somebody illustrate how there can be dependence and zero covariance? Or could there still be a ...
10
votes
3answers
167 views

Build a path probability tree for journeys through a website

I'm currently doing analysis on a website which requires that I create a decision tree diagram showing the likely route that people take whenever they arrive on the website. I am dealing with a ...
0
votes
0answers
43 views

When to use the raw dataset as opposed to a transformed dataset for computing divergence?

Let us assume I have a set of observations: Dataset 1: Raw $A = [a_1,a_2,a_3,a_4,...]$ $B = [b_1,b_2,b_3,b_4,...]$ One assumptions before I proceed: Range of the values that the random variable ...
5
votes
1answer
149 views

K-L divergence is 0 for clearly different distributions. Why?

I have two datasets whose densities look clearly different. However, when I use the KLdiv function, it gives me a value of 0 and I don't understand why. Any suggestions on where I am going wrong? ...
2
votes
2answers
158 views
0
votes
1answer
113 views

prior distribution to the binomial distribution probability distributions urn model

I have an infinite population with unknown mean of successes and failures. I'm drawing 400 times from the population and get 400 successes. Now I want to generate random estimates for the true mean of ...
1
vote
4answers
268 views

Methods & CRAN packages to predict probability using neural networks or others machine learning algorithms

I have a medical database containing 7 input variables (4 are binary) and a binary outcome variable (Survival: yes/no). My objective is to train and test an algorithm that predict probability of ...
2
votes
1answer
132 views

Logistic regression-like model for non-discrete outcomes

If I have a set of continuous predictors $X$ and a binary outcome $Y$ and I wanted to build a predictive model of $P(Y|X)$, I would start with a logistic regression model. However, in my particular ...
1
vote
0answers
83 views

probability of interest

The model that I created in R is: fit <- lm(hired ~ educ + exper + sex, data=data) what I am unsure of is how to fit to model to predict probability of interest where p = pr(hiring = 1). Any ...
0
votes
0answers
40 views

binomial approximation - precision errors

For an estimation problem, i have to compute binomial probabilities given high n,x and low p. Specifically, I compose a matrix A, whose entries are 0 if i >j , and dbinom(x=j, size=i, p) if i<= ...
3
votes
1answer
68 views

Generating non-zero binomial probabilities (n,k ) with small p and large n - k

I am trying to generate binomial probabilities (in R) as follows: ${N \choose{k}} p^{k} (1-p)^{(n-k)}$ My problem is given $p \approx 0.03$, and $N =400$, $k>270$, I get the probability equal to ...
2
votes
1answer
83 views

How to produce a vector based on two probability distributions?

I am working on distribution on plants and I need to enter the chances that a plant starts reproducing at a certain age in a vector. Only this has to be done for more generations. Now, Imagine I ...
1
vote
0answers
22 views

dirichlet density function returning values > 1.0 [duplicate]

Possible Duplicate: Probability distribution value exceeding 1 is OK? I'm comparing results given by this implementation and that from the gtool library in R, of the Dirichlet density ...
9
votes
2answers
396 views

Optimal software package for bayesian analysis

I was wondering which software statistical package do you guys recommend for performing Bayesian Inference. For example, I know that you can run openBUGS or winBUGS as standalones or you can also ...
6
votes
3answers
307 views

Bootstrapping and comparing multiple proportions

EDIT 1: Thanks to @gung for pointing out that if the bag initially had 324 sweets, then as Mother hands them out, there are consecutively fewer amounts she can hand out. To simplify things (because ...
4
votes
1answer
570 views

Graphing a Probability Curve for a Logit Model With Multiple Predictors

I have the following probability function: $$\text{Prob} = \frac{1}{1 + e^{-z}}$$ where $$z = B_0 + B_1X_1 + \dots + B_nX_n.$$ My model looks like $$\Pr(Y=1) = \frac{1}{1 + \exp\left(-[-3.92 + ...
3
votes
1answer
493 views

How to interpret the results of the R pnorm and analogous functions?

The help for the pnorm function states: It says that pnorm gives the "distribution function", but it seems that it gives the quantile, for example, ...
7
votes
5answers
564 views

How to assess predictive power of set of categorical predictors of a binary outcome? Calculate probabilities or logistic regression?

I am trying to determine if simple probabilities will work for my problem or if it will be better to use (and learn about) more sophisticated methods like logistic regression. The response variable ...
4
votes
2answers
485 views

Simulating a Gaussian process with an exponentially decaying covariance function

I'm trying to generate many draws (i.e., realizations) of a Gaussian process $e_i(t)$, $1\leq t \leq T$ with mean 0 and covariance function $\gamma(s,t)=\exp(-|t-s|)$. Is there an efficient way ...
1
vote
1answer
118 views

Hypergeometric trials - Number of trials needed to achieve a given probability

Given a known number of white and black balls in an urn, what is the number of trials without replacement required to achieve a given x probability of drawing at least one white ball. Which function ...
2
votes
2answers
434 views

Binomial trials required to achieve a given probability of at least one success

If p is the probability of success of a binomial trial i would like to calculate the number of trials n required that if performed would give a probability x of at least one success. Is there a way to ...
0
votes
1answer
59 views

Cost Benefit/Effectiveness

I would like to compare the results of several diagnostic modalities on a population to identify a disease. More specifically I would like to compare the sensitivity of the modalities (all have 100% ...
2
votes
1answer
158 views

Test to calculate the probability of winning

I'm running a predictive model to predict the probability of winning a certain item based on the price that I bid (other factors also). After running the model (ols) in R, I wanted to account for all ...
2
votes
4answers
2k views

How to create a dataset with conditional probability?

Suppose that a certain disease (D) has a prevalence of 3/1000. Also suppose that a certain symptom (S) has a prevalence (in the general population = people with that disease D and people without that ...
3
votes
3answers
664 views

Fitting a probability distribution to zero inflated data in R

I am trying to learn how to fit a probability distribution to a vector of data, using the program R, but there are a lot of potential probability distributions to use! So my question is, how do I ...
1
vote
1answer
1k views

How to compare proportions across different groups with varying population sizes?

I am trying to understand what statistical measures I can use to compare three groups having varying populations to understand which group is bad (highest probability of death or most vulnerable or ...
4
votes
3answers
110 views

How to visualize iterative parameter constraint?

I have conducted an analysis in which I start with a set of informed prior parameter distributions, and then conduct sequential analyses that constrain the distributions with data. I am currently ...
0
votes
1answer
93 views

How to determine the statistical significance of a score from a general population?

Let's say I got a reading of 5 for a given measurement. For a random population, I got the following dataset of readings: ...
9
votes
5answers
935 views

Time taken to hit a pattern of heads and tails in a series of coin-tosses

Inspired by Peter Donnelly's talk at TED, in which he discusses how long it would take for a certain pattern to appear in a series of coin tosses, I created the following script in R. Given two ...
5
votes
2answers
116 views

Probabilities in case-controlled studies

I have a nested-case control study that I have been using for analysis. At the end of my work I have deduced a set of variables that I use later to to classify new cases. One example of a simple ...
2
votes
1answer
494 views

Predicted probabilities from a multinomial regression model using zelig and R

I have a multinomial model estimated with the zelig package in R. Whenever I try to use the setx() command, I get an error message saying there is more than one mode. So in stead of using Zelig, I ...
7
votes
4answers
280 views

How can I estimate the density of a zero-inflated parameter in R?

I have a data set with lots of zeros that looks like this: set.seed(1) x <- c(rlnorm(100),rep(0,50)) hist(x,probability=TRUE,breaks = 25) I would like to draw ...
8
votes
4answers
249 views

Seeking a distribution, perhaps uncommon, consistent with two data points and expert constraints?

I am trying to state a prior distribution for a Bayesian meta-analysis. I have the following information about a random variable: Two observations: 3.0, 3.6 a scientist who studies the variable ...
2
votes
1answer
452 views

Is there any relation between Power Law and Negative Binomial distribution?

In a social experiment that I was conducting, I was trying to count the number of people each user contacted in a period of 10 days. The population size was 100 for the experiment. Based on the values ...
5
votes
1answer
230 views

How could I predict the results of a simple card game?

I want to predict the results of a simple card game, to judge on average, how long a game will last. My 'simple' game is; Cards are dealt from a randomised deck to n players (typically 2-4) Each ...