Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10136 > unrolled thread

Re: Maximisation question

Started byBob Hanlon <hanlonr357@gmail.com>
First post2012-05-19 09:46 +0000
Last post2012-05-19 09:46 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Maximisation question Bob Hanlon <hanlonr357@gmail.com> - 2012-05-19 09:46 +0000

#10136 — Re: Maximisation question

FromBob Hanlon <hanlonr357@gmail.com>
Date2012-05-19 09:46 +0000
SubjectRe: Maximisation question
Message-ID<jp7q5s$qfa$1@smc.vnet.net>
I'm guessing that you meant 100 <= i < 0 rather than 100 <= f(i) < 0

f[n_] := PDF[BinomialDistribution[100, .1], n]

Maximize[{f[j], 0 < j <= 100}, j, Integers]

{0.131865, {j -> 10}}

Maximize[{f[j], 0 < j <= 100, Element[j, Integers]}, j]

{0.131865, {j -> 10}}

If f and cons are linear or polynomial, Maximize will always find a
global maximum.  In cases where Maximize only finds a local maxima,
you can use an exhaustive search.

data = Table[{n, f[n]}, {n, 0, 100}];

Select[data, #[[2]] == Max[data[[All, 2]]] &]

{{10, 0.131865}}


Bob Hanlon


On Fri, May 18, 2012 at 5:23 AM, J.Jack.J. <jack.j.jepper@googlemail.com> wrote:
> For any integer j, suppose we have a function f(j). Then how would I
> find the highest f(i) such that 100 <= f(i) <0 ?
> With thanks in advance.
>

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web