The grid below is made up of line segments, like the line segment in red.
[asy]
unitsize(1 cm);
int i;
for (i = 0; i <= 3; ++i) {
draw((i,0)--(i,2));
}
for (i = 0; i <= 2; ++i) {
draw((0,i)--(3,i));
}
draw((3,1)--(3,2), linewidth(2*bp) + red);
label("$A$", (0,0), SW);
label("$B$", (3,2), NE);
[/asy]
There are a number of paths that go from $A$ to $B$ in the grid, where every step goes to the right or up. If we choose a line segment at random, then what is the expected number of paths that pass through it?