4

The basic concept is that they should be the same. However, different statistical programs use slight variations that give different answers. Several variations are illustrated here. I have chosen data for which there is no significant effect. (In my experience, P-values vary less in the case of significant effects.) My fake data are as follows: Gender\...


2

Let $X \sim \mathsf{Binom}(n = 95, p = .18).$ Then you seek $P(X \ge 10) = 1 - P(X \le 9) = 0.9841.$ Directly in R, where pbinom is a binomial CDF, we have 1 - pbinom(9, 95, .18) [1] 0.9840775 Using a normal approximation with continuity correction, you should begin with $P(X \ge 10) = P(X > 9.5) = \cdots .$ You have the right idea, except I guess you ...


2

Since the RVs are independent, we have $$P(X>2 \cap Y=2)=P(X>2)P(Y=2)$$ It seems that your $P(Y=2)={10 \choose 2}(0.2)^2(0.8)^8$ is correct but $P(X>2)$ is not. Share your calculation details for the latter. When it is correct, you’ll just substitute into above equation. The conditional probability is equal to the unconditional one, because the RVs ...


2

Assuming that the regression model is: $$ \mathrm{logit}(p)=\beta_{0}+\beta_{1}\mathrm{age} + \beta_{2}\mathrm{cancer} + \beta_{3}\mathrm{age}\times\mathrm{cancer} $$ where $\mathrm{cancer}$ is a dummy variable that is 1 for people who have cancer and 0 for people who don't. For people who don't have cancer, the model simplifies to $$ \mathrm{logit}(p)=\...


1

Use only one or the other (unscaled or scaled). If you try to include them both, they'll be perfectly collinear and will mess up your regression model (meaning "regression" in the most general sense). As mentioned in comments, scaling your variables will affect the estimated parameter values, and their interpretation (e.g. "change in log-odds of response ...


1

Suppose you have 20 trials and observe 5 successes. Using your prior, the following R code gives a 95% Bayesian posterior interval $(.501, .630)$ for the proportion of successes. Another run with a different seed gave $(.501, .629).$ [Maybe for fewer than 10 successes, you'd prefer a one-sided 95% interval, $(.5, .609).]$ set.seed(815) m = 10^7 p = ...


1

$2X > 4$ is the same as $X > 2$. Now think about relationship between $P(X > x)$ and $P(X \leq x)$.


1

$P(X>2)$ actually works (what went wrong?). It is $$P(X>2)=1-P(X\leq 2)=1-\sum_{i=0}^2{10 \choose i}(0.2)^i(0.8)^{10-i}$$


1

My answer follows the suggestion to express the noisy outcome as a likelihood. I have changed the notation a bit (from the question) to handle some additional complications. Let \begin{equation} p(y_t|\theta) = \textsf{Bernoulli}(\theta) = \begin{cases} \theta & y_t = 1 \\ 1-\theta & y_t = 0 \end{cases} , \end{equation} where \begin{equation} p(\...


Only top voted, non community-wiki answers of a minimum length are eligible