These bass riff exercises are a means to get both of your hands involved when improvising. Start by playing the bass riff shown in the left hand until you can play it comfortably and consistently. Once you have the bass line down, begin improvising on top of the bass line with your right hand. Remember to start slowly! If you begin too fast, any exercise can become frustrating very quickly.
You can try using a variety of different scales in your improvisation. Try using a C blues scale (C, Eb, F, F#, G, Bb, C), a C dorian scale (C, D, Eb, F, G, A, Bb, C), or perhaps a C major scale (C, D, E, F, G, A, B, C). Experiment with many different scales. Concentrate on listening to what works and what does not work over this particular bass line.
While you improvise, sing the melody you play in the right hand as you play it. It's the singing that will connect the dots between your mind, ear and hand, and you need to make this connection.