-1
$\begingroup$

This is the way I think it should go: # of heads=$p$, of tails= $1-p$ then

F(x)= \begin{cases} 0, & \text{if } x < 0, \\ \sqrt{x+1}, & \text{if } 0 \leq x < 1 \\ 1, & \text{if } x \geq 1 \end{cases} $F_X(x)=P(X\leq x)=P(p-1+p \leq x)= P(p \leq \sqrt{x+1})= F_x(\sqrt{x+1})$

  • 0
    Not following. There are only $8$ cases, just write them all out.2017-02-06
  • 0
    yeah i just realized it, I was just wondering about the distribution function of X part.2017-02-06
  • 0
    But I don't understand why you say, or appear to say, that $X$ can not be negative. If I toss $TTT$ then $X=-3$, no?2017-02-06
  • 0
    I was trying to mold my "thinking of distribution function" into this question, but I just saw my mistake. Yes you are right $TTT= -3$, also $THT= -1$, etc.2017-02-06

1 Answers 1

3

Since there are only $8$ possible outcomes, you can just write them out and compute the distribution of $X$ explicitly:

$$ \begin{array}{l|c} %l/c/r = left-align/centre/right-align | for a vertical bar \mathrm{Outcome} & X = \mbox{#heads} - \mbox{#tails}\\\hline HHH & 3 \\ HHT & 1 \\ HTH & 1 \\ HTT & -1 \\ TTT & -3 \\ TTH & -1 \\ THT & -1 \\ THH & 1 \end{array} $$

Since each outcome is equally likely*, we have $P(X=-3) = P(X=3) = \frac{1}{8}$ and $P(X=1) = P(X=-1) = \frac{3}{8}$. Therefore

$$ F(x)= P(X\leq x) = \begin{cases} 0, & \text{if } x < -3, \\ \frac{1}{8}, & \text{if } -3 \leq x < -1 \\ \frac{1}{2}, & \text{if } -1 \leq x < 1 \\ \frac{7}{8}, & \text{if } 1 \leq x < 3 \\ 1, & \text{if } x \geq 3 \end{cases} $$

*I just reread your question and it turns out your probability of heads is $p$ which is not necessarily $\frac{1}{2}$. However you can use the above logic to generalize to any $p$.

  • 0
    Okay I see how you did this problem then, so now I just have to generalize it to any p, but thanks I understand now!2017-02-06
  • 2
    @pwerth: you can use \begin{array} for tables. I've just edited your answer to do that and prettified the equation for $F(x)$. Feel free to undo if you don't like what I did.2017-02-06
  • 0
    @RobArthan thanks for the edit! I came across this thread http://meta.stackexchange.com/questions/73566/is-there-markdown-to-create-tables which seems to imply there is no good way to do tables, hence my initial attempt.2017-02-06
  • 0
    I just have one question, how did you get $\frac{1}{2}, if -1 \leq x < 1?$2017-02-06
  • 1
    There are 4 outcomes corresponding to the event where $-1\leq x < 1$: HTT, TTT, TTH, THT. So the probability of that occurring is $\frac{4}{8}$ or $\frac{1}{2}$2017-02-06
  • 0
    Wouldn't TTT= -3, and not $x \geq -1$?2017-02-06
  • 1
    Yes, TTT would give you $-3$. The point is that $F(x)$ is the probability that $X$ is less than or equal to $x$, not just equal. And $-3$ is less than 1.2017-02-06
  • 0
    Oh I understand now, I was getting confused because I wasn't focusing on $F(x) = P(X \leq x)$ Thanks!2017-02-06