#NEWLINE# def moment( X , n , c = 0 , condition = None , **kwargs ) : #NEWLINE# #INDENT# "\n    Return the nth moment of a random expression about c i.e. E((X-c)**n)\n    Default value of c is 0.\n\n    Examples\n    ========\n\n    >>> from sympy.stats import Die, moment, E\n    >>> X = Die('X', 6)\n    >>> moment(X, 1, 6)\n    -5/2\n    >>> moment(X, 2)\n    91/6\n    >>> moment(X, 1) == E(X)\n    True\n    " #NEWLINE# return expectation ( ( ( X - c ) ** n ) , condition , ** kwargs )