1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Minimizing a function

  1. Jan 13, 2012 #1
    1. The problem statement, all variables and given/known data

    Let [itex]f(a)=\frac{1}{n-1}\sum_{i=1}^{n}(x_{i}-a)^{2} [/itex]

    Find the value of a that minimizes f(a) by replacing [itex](x_{i}-a)[/itex] by [itex]((x_{i}-\bar{x})+(\bar{x}-a))[/itex].


    2. The attempt at a solution
    [itex]f(a)=\frac{1}{n-1}\sum_{i=1}^{n}((x_{i}-\bar{x})+(\bar{x}-a))^{2}=\frac{1}{n-1}\sum_{i=1}^{n}((x_{i}-\bar{x})^{2}+(\bar{x}-a){}^{2}+2(x_{i}-\bar{x})(\bar{x}-a))=\frac{1}{n-1}[\sum_{i=1}^{n}(x_{i}-\bar{x})^{2}+\sum(\bar{x}-a){}^{2}+\sum2(x_{i}-\bar{x})(\bar{x}-a)][/itex]

    I'm a little stuck here. Any ideas?
     
  2. jcsd
  3. Jan 13, 2012 #2
    Any ideas, guys?
     
  4. Jan 13, 2012 #3

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    Try using [itex]\sum_{i=1}^{n} x_{i}=n \bar{x}[/itex].
     
  5. Jan 13, 2012 #4
    Thanks!
     
  6. Jan 13, 2012 #5

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    In your final expression, the first sum doesn't depend on a. It's easy to make the other two equal to zero. Is that the minimum possible?

    Is the third sum equal to zero for all values of a ?
     
  7. Jan 13, 2012 #6
    I know that the minimum should be the mean a = 1\n[itex]\sum x_i[/itex]. How do I make the other two equal to zero?
     
    Last edited: Jan 13, 2012
  8. Jan 13, 2012 #7

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    What is [itex]\Sigma^n_1 (x_i-\bar{x})[/itex]?
     
  9. Jan 13, 2012 #8

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    Do you realize that [itex]\bar{x}[/itex] is:
    [itex]\displaystyle\bar{x}=\frac{1}{n}\sum_{i=1}^{n}x_i \,?[/itex] ​

    So you're saying that the solution is [itex]a=\bar{x}\,.[/itex]
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Minimizing a function
  1. Minimizing a Function (Replies: 2)

Loading...