asp.net pdf reader : Adjusting page size in pdf control software system azure winforms asp.net console jl-quant-econ11-part855

2.2. FINITEMARKOVCHAINS
111
a
b
1.0
c
1.0
1.0
Thechaincycleswithperiod3:
julia> using QuantEcon
julia> [0 1 1 00 0 11 0 0];
julia> mc MarkovChain(P);
julia> period(mc)
3
Moreformally,theperiodofastatesisthegreatestcommondivisorofthesetofintegers
D(s):=fj1:P
j
[s,s]>0g
Inthelastexample,D(s)=f3,6,9,...gforeverystates,sotheperiodis3
Astochasticmatrixiscalledaperiodiciftheperiodofeverystateis1,andperiodicotherwise
Forexample,thestochasticmatrixassociatedwiththetransitionprobabilitiesbelowisperiodic
because,forexample,stateahasperiod2
a
b
1.0
0.5
c
0.5
0.5
d
0.5
1.0
Wecanconfirmthatthestochasticmatrixisperiodicasfollows
julia> zeros(44);
julia> P[1,21;
julia> P[21P[230.5;
julia> P[32P[340.5;
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
Adjusting page size in pdf - Compress reduce PDF size in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
C# Code & .NET API to Compress & Decompress PDF Document
reduce pdf file size; advanced pdf compressor
Adjusting page size in pdf - VB.NET PDF File Compress Library: Compress reduce PDF size in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
VB.NET PDF Document Compression and Decompression Control SDK
.pdf printing in thumbnail size; acrobat compress pdf
2.2. FINITEMARKOVCHAINS
112
julia> P[431;
julia> mc MarkovChain(P);
julia> period(mc)
2
julia> is_aperiodic(mc)
false
StationaryDistributions
Asseenin(2.7),wecanshiftprobabilitiesforwardoneunitoftimeviapostmultiplicationbyP
Somedistributionsareinvariantunderthisupdatingprocess—forexample,
julia> [..6..8];
julia> psi [0.250.75];
julia> psi'*P
1x2 Array{Float64,2}:
0.25 0.75
Suchdistributionsarecalledstationary,orinvariantFormally,adistributiony
onSiscalledsta-
tionaryforPify
 =
y
P
Fromthisequalityweimmediatelygety
 =
y
P
t
forallt
Thistellsusanimportantfact: IfthedistributionofX
0
isastationarydistribution,thenX
t
will
havethissamedistributionforallt
Hencestationarydistributionshaveanaturalinterpretationasstochasticsteadystates—we’ll
discussthismoreinjustamoment
Mathematically,astationarydistributionisjustafixedpointofPwhenPisthoughtofasthemap
y7!yPfrom(row)vectorsto(row)vectors
TheoremEverystochasticmatrixPhasatleastonestationarydistribution
(WeareassumingherethatthestatespaceSisfinite;ifnotmoreassumptionsarerequired)
ForaproofofthisresultyoucanapplyBrouwer’sfixedpointtheorem,orseeEDTC,theorem4.3.5
TheremayinfactbemanystationarydistributionscorrespondingtoagivenstochasticmatrixP
• Forexample,ifPistheidentitymatrix,thenalldistributionsarestationary
Sincestationarydistributionsarelongrunequilibria, toget uniquenesswerequirethat initial
conditionsarenotinfinitelypersistent
Infinitepersistenceofinitialconditionsoccursifcertainregionsofthestatespacecannotbeac-
cessedfromotherregions,whichistheoppositeofirreducibility
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
C# PDF copy, paste image Library: copy, paste, cut PDF images in
one. Easy to zoom and crop image for adjusting image size. Besides C#.NET Project DLLs: Copy, Paste, Cut Image in PDF Page. In
pdf markup text size; best pdf compressor
VB.NET Image: Generate GS1-128/EAN-128 Barcode on Image & Document
width & height and four margin size in a EAN-128 barcode on multi-page TIFF/PDF/Word documents such as removing the document noise, adjusting page color mode
reader pdf reduce file size; adjust size of pdf
2.2. FINITEMARKOVCHAINS
113
ThisgivessomeintuitionforthefollowingfundamentaltheoremTheorem.IfPisbothaperiodic
andirreducible,then
1. Phasexactlyonestationarydistributiony
2. Foranyinitialdistributiony
0
,wehaveky
0
P
t
y
k!
0ast!¥
Foraproof,see,forexample,theorem5.2of[Haggstrom02]
(Notethatpart1ofthetheoremrequiresonlyirreducibility,whereaspart2requiresbothirre-
ducibilityandaperiodicity)
OneeasysufficientconditionforaperiodicityandirreducibilityisthateveryelementofPisstrictly
positive
• Trytoconvinceyourselfofthis
Example Recallourmodelofemployment/unemploymentdynamicsforagivenworkerdis-
cussedabove
Assuminga2(0,1)andb2(0,1),theuniformergodicityconditionissatisfied
Lety
 =(
p,1 p)bethestationarydistribution,sothatpcorrespondstounemployment(state
1)
Usingy
=
y
Pandabitofalgebrayields
p=
b
a+b
Thisis,insomesense,asteadystateprobabilityofunemployment—moreoninterpretationbelow
Notsurprisinglyittendstozeroasb!0,andtooneasa!0
CalculatingStationaryDistributions Asdiscussedabove,agivenMarkovmatrixPcanhave
manystationarydistributions
Thatis,therecanbemanyrowvectorsysuchthaty=yP
InfactifPhastwodistinctstationarydistributionsy
1
,y
2
thenithasinfinitelymany,sinceinthis
case,asyoucanverify,
y
3
:=ly
1
+(1 l)y
2
isastationarydistribuitonforPforanyl2[0,1]
Ifwerestrictattentiontothecasewhereonlyonestationarydistributionexists,oneoptionfor
findingitistotrytosolvethelinearsystemy(I
n
P)=0fory,whereI
n
isthennidentity
Butthezerovectorsolvesthisequation
Henceweneedtoimposetherestrictionthatthesolutionmustbeaprobabilitydistribution
AsuitablealgorithmisimplementedinQuantEcon—thenextcodeblockillustrates
using
QuantEcon
P
=
[.4
.6;
.2
.8]
mc
=
MarkovChain(P)
println(mc_compute_stationary(mc))
Thestationarydistributionisunique
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
C# Image: Zoom Image and Document Page in C#.NET Web Viewer
is designed to help developer view source image or document page by adjusting the target file enlarge or reduce the source file until the file size fits the
pdf compression; pdf change page size
VB.NET Excel: VB Methods to Set and Customize Excel Rendering
we treat every single Excel spreadsheet as a page in our VB the fixed image size ration that the size is limited Thus, when VB.NET users are adjusting the image
change font size in pdf fillable form; pdf compress
2.2. FINITEMARKOVCHAINS
114
ConvergencetoStationarity Part2oftheMarkovchainconvergencetheoremstatedabovetells
usthatthedistributionofX
t
convergestothestationarydistributionregardlessofwherewestart
off
Thisaddsconsiderableweighttoourinterpretationofy
asastochasticsteadystate
Theconvergenceinthetheoremisillustratedinthenextfigure
Here
• Pisthestochasticmatrixforrecessionandgrowthconsideredabove
• Thehighestreddotisanarbitrarilychoseninitialprobabilitydistributiony,representedas
avectorinR
3
• TheotherreddotsarethedistributionsyP
t
fort=1,2,...
• Theblackdotisy
ThecodeforthefigurecanbefoundintheQuantEconapplicationslibrary—youmightliketo
tryexperimentingwithdifferentinitialconditions
Ergodicity
Underirreducibility,yetanotherimportantresultobtains:Foralls2S,
1
n
n
å
t=1
1fX
t
=sg!y
[sasn!¥
(2.10)
Here
• 1fX
t
=sg=1ifX
t
=sandzerootherwise
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
View Images & Documents in Web Image Viewer | Online Tutorials
control add-on offers developers three different APIs for adjusting image viewing size. developers to adjust the width of current displayed page to the
pdf edit text size; best way to compress pdf file
VB.NET Image: Image Resizer Control SDK to Resize Picture & Photo
VB.NET Code for Adjusting Image Size. In order to We are dedicated to provide powerful & profession imaging controls, PDF document, image to pdf files and
adjust size of pdf file; pdf page size dimensions
2.2. FINITEMARKOVCHAINS
115
• convergenceiswithprobabilityone
• theresultdoesnotdependonthedistribution(orvalue)ofX
0
Theresulttellsusthatthefractionoftimethechainspendsatstatesconvergestoy
[s]astime
goestoinfinityThisgivesusanotherwaytointerpretthestationarydistribution—providedthat
theconvergenceresultin(2.10)isvalid
Theconvergencein(2.10)isaspecialcaseofalawoflargenumbersresultforMarkovchains—
seeEDTC,section4.3.4forsomeadditionalinformation
Example Recallourcross-sectionalinterpretationoftheemployment/unemploymentmodel
discussedabove
Assumethata2(0,1)andb2(0,1),sothatirreducibilityandaperiodicitybothhold
Wesawthatthestationarydistributionis(p,1 p),where
p=
b
a+b
Inthecross-sectionalinterpretation,thisisthefractionofpeopleunemployed
Inviewofourlatest(ergodicity)result,itisalsothefractionoftimethataworkercanexpectto
spendunemployed
Thus, inthelong-run,cross-sectionalaveragesforapopulationandtime-seriesaveragesfora
givenpersoncoincide
Thisisoneinterpretationofthenotionofergodicity
ComputingExpectations
Weareinterestedincomputingexpectationsoftheform
E[h(X
t
)]
(2.11)
andconditionalexpectationssuchas
E[h(X
t+k
)jX
t
=s]
(2.12)
where
• fX
t
gisaMarkovchaingeneratedbynnstochasticmatrixP
• h:S!
isagivenfunction
Theunconditionalexpectation(2.11)iseasy:WejustneedtosumoverthedistributionofX
t
Thatis,wetake
E[h(X
t
)]=
å
s2S
(yP
t
)[s]h[s]
whereyisthedistributionofX
0
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
VB.NET Image: How to Process & Edit Image Using VB.NET Image
vintage effect creating, image color adjusting and image VB.NET image editor control SDK online tutorial page. functions into several small-size libraries that
can pdf files be compressed; can a pdf be compressed
C# Image: How to Add Customized Web Viewer Command in C#.NET
Able to adjust the displaying image size and style button for deleting an existing page from web other options for you, such as adjusting toolbar, controlling
best pdf compressor online; change font size fillable pdf
2.2. FINITEMARKOVCHAINS
116
Inthissettingit’straditionaltoregardhasacolumnvector,inwhichcasetheexpressioncanbe
rewrittenmoresimplyas
E[h(X
t
)]=yP
t
h
Asfortheconditionalexpectation(2.12),weneedtosumovertheconditionaldistributionofX
t+k
givenX
t
=s
WealreadyknowthatthisisP
k
[s,],so
E[h(X
t+k
)jX
t
=s]=(P
k
h)[s]
(2.13)
ThevectorP
k
hstorestheconditionalexpectationE[h(X
t+k
)jX
t
=s]overalls
ExpectationsofGeometricSums Sometimeswealsowanttocomputeexpectationsofageo-
metricsum,suchas
å
t
b
t
h(X
t
)
Inviewoftheprecedingdiscussion,thisis
"
¥
å
j=0
b
j
h(X
t+j
)jX
t
=s
#
=[(I bP)
1
h][s]
where
(I bP)
1
=I+bP+b
2
P
2
+
Premultiplicationby(bP)
1
amountsto“applyingtheresolventoperator
Exercises
Exercise1 Accordingtothediscussionimmediatelyabove,ifaworker’semploymentdynamics
obeythestochasticmatrix
P=
a
a
b
b
witha2(0,1)andb2(0,1),then,inthelong-run,thefractionoftimespentunemployedwillbe
p:=
b
a+b
Inotherwords,iffX
t
grepresentstheMarkovchainforemployment,then
¯
X
n
pasn¥,
where
¯
X
n
:=
1
n
n
å
t=1
1fX
t
=1g
Yourexerciseistoillustratethisconvergence
First,
• generateonesimulatedtimeseriesfX
t
goflength10,000,startingatX
0
=1
• plot
¯
X
n
pagainstn,wherepisasdefinedabove
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
VB.NET Image: VB.NET Rectangle Annotation Imaging Control
New RectangleAnnotation() ' set annotation size obj.X rectangle annotation by adjusting annotation properties profession imaging controls, PDF document, image
change file size of pdf; adjust pdf size preview
VB.NET PDF: How to Create Watermark on PDF Document within
add text or image as a watermark on PDF page using VB be used as a text watermark; Support adjusting text font style in VB class, like text size and color;
batch reduce pdf file size; change font size in pdf
2.2. FINITEMARKOVCHAINS
117
Second,repeatthefirststep,butthistimetakingX
0
=2
Inbothcases,seta=b=0.1
Theresultshouldlooksomethinglikethefollowing—modulorandomness,ofcourse
(Youdon’tneedtoaddthefancytouchestothegraph—seethesolutionifyou’reinterested)
Exercise2 Atopicofinterestforeconomicsandmanyotherdisciplinesisranking
Let’snowconsideroneofthemostpracticalandimportantrankingproblems—therankassigned
towebpagesbysearchengines
(Althoughtheproblemismotivatedfromoutsideofeconomics,thereisinfactadeepconnection
betweensearchrankingsystemsandpricesincertaincompetitiveequilibria—see[DLP13])
Tounderstandtheissue,considerthesetofresultsreturnedbyaquerytoawebsearchengine
Fortheuser,itisdesirableto
1. receivealargesetofaccuratematches
2. havethematchesreturnedinorder,wheretheordercorrespondstosomemeasureof“im-
portance”
Rankingaccordingtoameasureofimportanceistheproblemwenowconsider
ThemethodologydevelopedtosolvethisproblembyGooglefoundersLarryPageandSergey
BrinisknownasPageRank
Toillustratetheidea,considerthefollowingdiagram
ImaginethatthisisaminiatureversionoftheWWW,with
• eachnoderepresentingawebpage
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
2.2. FINITEMARKOVCHAINS
118
• eacharrowrepresentingtheexistenceofalinkfromonepagetoanother
Nowlet’sthinkaboutwhichpagesarelikelytobeimportant,inthesenseofbeingvaluabletoa
searchengineuser
Onepossiblecriterionforimportanceofapageisthenumberofinboundlinks—anindicationof
popularity
Bythismeasure,mandjarethemostimportantpages,with5inboundlinkseach
However,whatifthepageslinkingtom,say,arenotthemselvesimportant?
Thinkingthisway,itseemsappropriatetoweighttheinboundnodesbyrelativeimportance
ThePageRankalgorithmdoespreciselythis
Aslightlysimplifiedpresentationthatcapturesthebasicideaisasfollows
Lettingjbe(theintegerindexof)atypicalpageandr
j
beitsranking,weset
r
j
=
å
i2L
j
r
i
i
where
• 
i
isthetotalnumberofoutboundlinksfromi
• L
j
isthesetofallpagesisuchthatihasalinktoj
Thisisameasureofthenumberofinboundlinks,weightedbytheirownranking(andnormalized
by1/
i
)
Thereis,however,anotherinterpretation,anditbringsusbacktoMarkovchains
LetPbethematrixgivenbyP[i,j]=1fi!jg/
i
where1fi!jg=1ifihasalinktojandzero
otherwise
ThematrixPisastochasticmatrixprovidedthateachpagehasatleastonelink
WiththisdefinitionofPwehave
r
j
=
å
i2L
j
r
i
i
=
å
alli
1fi!jg
r
i
i
=
å
alli
P[i,j]r
i
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
2.2. FINITEMARKOVCHAINS
119
Writingrfortherowvectorofrankings,thisbecomesr=rP
HenceristhestationarydistributionofthestochasticmatrixP
Let’sthinkofP[i,j]astheprobabilityof“moving”frompageitopagej
ThevalueP[i,j]hastheinterpretation
• P[i,j]=1/kifihaskoutboundlinks,andjisoneofthem
• P[i,j]=0ifihasnodirectlinktoj
Thus,motionfrompagetopageisthatofawebsurferwhomovesfromonepagetoanotherby
randomlyclickingononeofthelinksonthatpage
Here“random”meansthateachlinkisselectedwithequalprobability
SinceristhestationarydistributionofP,assumingthattheuniformergodicityconditionisvalid,
wecaninterpretr
j
asthefractionoftimethata(verypersistent)randomsurferspendsatpagej
Yourexerciseistoapplythisrankingalgorithmtothegraphpicturedabove,andreturnthelistof
pagesorderedbyrank
Thedataforthisgraphisintheweb_graph_data.txtfilefromthemainrepository—youcanalso
viewithere
Thereisatotalof14nodes(i.e.,webpages),thefirstnamedaandthelastnamedn
Atypicallinefromthefilehastheform
-> h;
Thisshouldbeinterpretedasmeaningthatthereexistsalinkfromdtoh
Toparsethisfileandextracttherelevantinformation,youcanuseregularexpressions
Thefollowingcodesnippetprovidesahintastohowyoucangoaboutthis
julia> matchall(r"\w""x +++ y ****** z")
3-element Array{SubString{UTF8String},1}:
"x"
"y"
"z"
julia> matchall(r"\w""a ^^ b &&& \$\$ $ c")
3-element Array{SubString{UTF8String},1}:
"a"
"b"
"c"
Whenyousolvefortheranking,youwillfindthatthehighestrankednodeisinfactg,whilethe
lowestisa
Exercise3 Innumericalworkitissometimesconvenienttoreplaceacontinuousmodelwitha
discreteone
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
2.2. FINITEMARKOVCHAINS
120
Inparticular,MarkovchainsareroutinelygeneratedasdiscreteapproximationstoAR(1)processes
oftheform
y
t+1
=ry
t
+u
t+1
Hereu
t
isassumedtobeiidandN(0,s
2
u
)
Thevarianceofthestationaryprobabilitydistributionoffy
t
gis
s
2
y
:=
s
2
u
r2
Tauchen’smethod[Tau86]isthemostcommonmethodforapproximatingthiscontinuousstate
processwithafinitestateMarkovchain
Asafirststepwechoose
• n,thenumberofstatesforthediscreteapproximation
• m,anintegerthatparameterizesthewidthofthestatespace
Nextwecreateastatespacefx
0
,...,x
1
gRandastochasticnnmatrixPsuchthat
• x
0
ms
y
• x
1
=ms
y
• x
i+1
=x
i
+swheres=(x
1
x
0
)/(n 1)
• P[i,j]representstheprobabilityoftransitioningfromx
i
tox
j
LetFbethecumulativedistributionfunctionofthenormaldistributionN(0,s
2
u
)
ThevaluesP[i,j]arecomputedtoapproximatetheAR(1)process—omittingthederivation,the
rulesareasfollows:
1. Ifj=0,thenset
P[i,j]=P[i,0]=F(x
0
rx
i
+s/2)
2. Ifj=1,thenset
P[i,j]=P[i,1]=F(x
1
rx
i
s/2)
3. Otherwise,set
P[i,j]=F(x
j
rx
i
+s/2F(x
j
rx
i
s/2)
The exercise is s to o write a function n approx_markov(rho, , sigma_u, m=3, n=7) ) that t returns
fx
0
,...,x
1
gRandnnmatrixPasdescribedabove
Solutions
Solutionnotebook
T
HOMAS
S
ARGENTAND
J
OHN
S
TACHURSKI
April20,2016
Documents you may be interested
Documents you may be interested