1

I have the following table:

\begin{table}[h!]
\def\arraystretch{1.5}
\begin{tabular}{c|cccc}
$x$ & $-4$ & $0$ & $4$ & $12$ \\ \hline
$P_X(x)$ & $\frac{1}{4}$ & $\frac{1}{6}$ & $\frac{1}{4}$ & $\frac{1}{3}$ \\ \hline
$F_X(x)$ & $\frac{1}{4}$ & $\frac{5}{12}$ & $\frac{2}{3}$ & $1$
\end{tabular}
\end{table}

and the following function:

$$F_X(x)=\begin{cases}0&\text{für \phantom{a}}x < -4,\\
1/4&\text{für \phantom{a}}-4 \leq x < 0,\\
5/12&\text{für \phantom{a}}0 \leq x < 4, \\
2/3&\text{für \phantom{a}}4 \leq x < 12, \\
1&\text{für \phantom{a}} x \geq 12. \\
\end{cases}$$

They look like this:

table

function

What I want is: [Table] $\Rightarrow$ [Function], so that they are next to each other (horizontally). How can I do this? Any help would be much appreciated!

2
  • Just [Table] $\Rightarrow [Function]$ works, but [Table] is not the table float environment, but only the tabular environment.
    – Fran
    Commented May 11, 2020 at 21:45
  • @Fran Where do I put this? Can you please show it my code?
    – Monika
    Commented May 11, 2020 at 21:49

1 Answer 1

1
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{table}
\def\arraystretch{1.5}
\[\begin{array}{c|cccc}
x & -4 & 0 & 4 & 12 \\ \hline
P_X(x) & \frac{1}{4} & \frac{1}{6} & \frac{1}{4} & \frac{1}{3} \\ \hline
F_X(x) & \frac{1}{4} & \frac{5}{12} & \frac{2}{3} & 1
\end{array}
\Rightarrow F_X(x)=\begin{cases}0&\text{für \phantom{a}}x < -4,\\
1/4&\text{für \phantom{a}}-4 \leq x < 0,\\
5/12&\text{für \phantom{a}}0 \leq x < 4, \\
2/3&\text{für \phantom{a}}4 \leq x < 12, \\
1&\text{für \phantom{a}} x \geq 12. \\
\end{cases}\]
\end{table}
\end{document}
1
  • Thank you for your help!
    – Monika
    Commented May 11, 2020 at 21:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .