Fcurve noise modifier: change settings with python
You shouldn't ever use bpy.ops.anim.keyframe_insert_menu(), it's solely meant for user interface interaction. Use Object.keyframe_insert() (not the operator!) instead.

There's also no reason to use bpy.ops.graph.fmodifier_add(), especially because the dependency on an area type. Use the low-level RNA methods instead:

import bpy

ob = bpy.context.object

ob.keyframe_insert("scale") # ensures animation_data and action are not None
action = ob.animation_data.action

for fcu in action.fcurves:
    if fcu.data_path == "scale":
        mod = fcu.modifiers.new("NOISE")
        mod.scale = 5