First calculate if you're on the X belonging to a stripe, and then use noise texture to calculate the stripe height. Floor is used to snap the X coordinate for the entire strip to just one value, so that a stripe has equal height along its entire width - you may want to mute the Floor node when adjusting your noise, to see the noise's effect better.
The noise produces a value in range $[0, +1]$, but it can be multiplied by a Max Height different than
1 to increase or decrease the range of possible heights. Alternatively you can use pass the noise through a color ramp to control the heights. Then this value is divided by 2, because the next step is to measure if y coordinate is either above or below that value from the middle. Finally use Multiply as a logical AND, to control if the pixel belongs to a strip or not.
Not sure if that's intended, but in your question the lines aren't straight - can be achieved with another noise, this time modifying the coordinates:
About using Math > Multiply and Math > Add as AND and OR:
How do I get 1 for a certain range of a value?