It looks like you have an indentation problem, you are calling the graph
function within itself. Try the following:
def graph(numX, xWidth, scaleY, radius=2):
minY = 0
offsetX = -200
for xVal in range(numX):
x = offsetX + (xVal*xWidth)
rand = random.random()
y = minY + int(rand*scaleY)
turtle.penup()
turtle.goto(x,y)
turtle.pendown()
turle.circle(radius)
graph(20, 20, 100, 5)
turtle.mainloop()