﻿

# c# code to view pdf file : Add page to pdf preview SDK software service wpf winforms .net dnn pspp3-part251

Chapter5:Usingpspp
23
5.3 HypothesisTesting
One of the most fundamentalpurposes s of f statistical analysis is s hypothesis s testing. . Re-
searchers commonlyneedtotesthypothesesaboutasetofdata. . Forexample,shemight
wanttotestwhetheronesetofdatacomesfromthesamedistributionasanother,orwhether
themeanofadatasetsigniﬁcantlydiﬀersfromaparticularvalue.Thissectionpresentsjust
someofthepossibleteststhatpsppoﬀers.
Theresearcherstartsbymakinganullhypothesis. Oftenthisisahypothesiswhichhe
suspectstobefalse. Forexample,ifhesuspectsthatAisgreaterthanBhewillstatethe
nullhypothesisasA=B.
2
The p-value e isa a recurringconcept inhypothesis testing. . It t is the highestacceptable
probabilitythattheevidenceimplyinganullhypothesisisfalse,couldhavebeenobtained
whenthenullhypothesisisinfacttrue.Notethatthisisnotthesameas“theprobability
ofmakinganerror”norisitthesameas“theprobabilityofrejectingahypothesiswhenit
istrue”.
5.3.1 Testingfordiﬀerencesofmeans
Acommonstatisticaltestinvolveshypothesesaboutmeans.TheT-TESTcommandisused
toﬁndoutwhetherornottwoseparatesubsetshavethesamemean.
Example 5.6uses the ﬁle physiology.sav previously encountered. . Aresearcher r sus-
pectedthattheheightsandcorebodytemperatureofpersonsmightbediﬀerentdepending
upontheirsex. Toinvestigatethis,heposedtwonullhypotheses:
 Themeanheightsofmalesandfemalesinthepopulationareequal.
 Themeanbodytemperatureofmalesandfemalesinthepopulationareequal.
Forthepurposesoftheinvestigationtheresearcherdecidedtouseap-valueof0.05.
InadditiontotheT-test,theT-TESTcommandalsoperformstheLevenetestforequal
variances. If f the variances are e equal, then n a more e powerful l form of f the e T-test t can be
used. Howeverifitisunsafetoassumeequalvariances,thenanalternativecalculationis
necessary. psppperformsbothcalculations.
Fortheheightvariable,theoutputshowsthesigniﬁcanceoftheLevenetesttobe0.33
whichmeansthereisa33%probabilitythattheLevenetestproducesthisoutcomewhen
thevariancesareequal. Hadthesigniﬁcancebeenlessthan0.05,thenitwouldhavebeen
unsafetoassumethatthevarianceswereequal. However,becausethevalueishigherthan
0.05thehomogeneityofvariancesassumptionissafeandthe“EqualVariances”row(the
morepowerfultest)canbeused. Examiningthis s row,the twotailedsigniﬁcanceforthe
height t-testislessthan0.05,soitissafetorejectthenullhypothesisandconcludethat
themeanheightsofmalesandfemalesareunequal.
For the temperature variable,thesigniﬁcanceoftheLevenetestis 0.58soagain,itis
safe touse the rowfor equalvariances. . The e equalvariances row indicates thatthe two
tailedsigniﬁcancefortemperature is0.20. . Sincethisis s greaterthan0.05we must reject
thenullhypothesisandconcludethatthereisinsuﬃcientevidencetosuggestthatthebody
temperatureofmaleandfemalepersonsarediﬀerent.
2
ThisexampleassumesthatitisalreadyproventhatBisnotgreaterthanA.
Add page to pdf preview - insert pages into PDF file in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Guide C# Users to Insert (Empty) PDF Page or Pages from a Supported File Format
add document to pdf pages; add a blank page to a pdf
Add page to pdf preview - VB.NET PDF Page Insert Library: insert pages into PDF file in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Easy to Use VB.NET APIs to Add a New Blank Page to PDF Document
add page numbers pdf file; adding page numbers to pdf in
Chapter5:Usingpspp
24
PSPP> get t file=’/usr/local/share/pspp/examples/physiology.sav’.
PSPP> recode e height t (179 9 = SYSMIS).
PSPP> t-test t group=sex(0,1) ) /variables = = height temperature.
Output:
1.1 T-TEST. . Group p Statistics
#==================#==#=======#==============#========#
#
sex | | N| | Mean n |Std. . Deviation|SE. Mean#
#==================#==#=======#==============#========#
#height
Male |22|1796.49|
49.71|
10.60#
#
Female|17|1610.77|
25.43|
6.17#
#temperature Male e |22| | 36.68|
1.95|
.42#
#
Female|18| 37.43|
1.61|
.38#
#==================#==#=======#==============#========#
1.2 T-TEST. . Independent t Samples s Test
#===========================#=========#===============================
=#
#
# Levene’s| | t-test for Equality y of Means
#
#
#----+----+------+-----+------+---------+-
-#
#
#
|
|
|
|
|
|
#
#
#
|
|
|
|Sig. 2|
|
#
#
# F F |Sig.|
t | df f |tailed|Mean Diff|
#
#===========================#====#====#======#=====#======#=========#=
=#
#height
Equal variances# .97| | .33| 14.02|37.00|
.00|
185.72| ... . #
#
Unequal variances#
|
| 15.15|32.71|
.00|
185.72| ... . #
#temperature Equal l variances# .31| | .58| -1.31|38.00|
.20|
-.75| ... . #
#
Unequal variances#
|
| -1.33|37.99|
.19|
-.75| ... . #
#===========================#====#====#======#=====#======#=========#=
=#

Example 5.6: : The e T-TEST commandtests for diﬀerences of means. . Here, , the height
variable’stwotailedsigniﬁcance isless than0.05,sothenullhypothesiscanbe rejected.
Thus,theevidence suggeststhere isadiﬀerencebetweentheheightsof maleandfemale
persons. Howeverthesigniﬁcanceofthetestforthetemperature e variableisgreaterthan
0.05sothenullhypothesiscannotberejected,andthereisinsuﬃcientevidencetosuggest
adiﬀerenceinbodytemperature.
5.3.2 LinearRegression
Linearregressionisatechniqueusedtoinvestigateifandhowavariableislinearlyrelated
toothers. If f avariable is foundtobelinearly related, thenthis canbeusedtopredict
futurevaluesofthatvariable.
InexampleExample5.7,theservicedepartmentofthecompanywantedtobeableto
predictthetimetorepairequipment,inordertoimprovetheaccuracyoftheirquotations.
Itwassuggestedthatthetimetorepairmightberelatedtothetimebetweenfailuresand
thedutycycleoftheequipment. Thep-valueof0.1waschosenforthisinvestigation. In
order toinvestigatethishypothesis,theREGRESSIONcommandwas used. . Thiscommand
C# WinForms Viewer: Load, View, Convert, Annotate and Edit PDF
PDF Annotation. • Add sticky notes to PDF document in preview. Add text to PDF document in preview. • Add text box to PDF file in preview.
add remove pages from pdf; add page numbers to a pdf file
C# WPF Viewer: Load, View, Convert, Annotate and Edit PDF
This page will mainly let you know: PDF Annotation. • Add sticky notes to PDF document. • Highlight PDF text in preview. • Add text to PDF document.
add pages to pdf document; adding a page to a pdf in preview
Chapter5:Usingpspp
25
notonlytestsifthevariablesarerelated,butalsoidentiﬁesthepotentiallinearrelationship.
SeeSection15.16[REGRESSION],page152.
How to C#: Preview Document Content Using XDoc.Word
RasterEdge XDoc.Word provide you with APIs to get a thumbnail bitmap of the first page in the word document file. C# DLLs for Word File Preview. Add references:
add a page to a pdf in acrobat; adding page to pdf in preview
How to C#: Preview Document Content Using XDoc.PowerPoint
APIs to get a thumbnail bitmap of the first page in the C# DLLs: Preview PowerPoint Document. Add necessary XDoc.PowerPoint DLL libraries into your created C#
add page pdf reader; add page numbers to pdf files
Chapter5:Usingpspp
26
PSPP> get t file=’/usr/local/share/pspp/examples/repairs.sav’.
PSPP> regression /variables = = mtbf duty_cycle /dependent = mttr.
PSPP> regression /variables = = mtbf /dependent = mttr.
Output:
1.3(1) REGRESSION. . Coefficients
#=============================================#====#==========#====#=====#
#
# B B |Std. Error|Beta| | t #
#========#====================================#====#==========#====#=====#
#
|(Constant)
#9.81|
1.50| .00| 6.54#
#
|Mean time between failures (months) #3.10|
.10| .99|32.43#
#
|Ratio of working to non-working g time#1.09|
1.78| .02| | .61#
#
|
#
|
|
|
#
#========#====================================#====#==========#====#=====#
1.3(2) REGRESSION. . Coefficients
#=============================================#============#
#
#Significance#
#========#====================================#============#
#
|(Constant)
#
.10#
#
|Mean time between failures (months) #
.00#
#
|Ratio of working to non-working g time#
.55#
#
|
#
#
#========#====================================#============#
2.3(1) REGRESSION. . Coefficients
#============================================#=====#==========#====#=====#
#
# B |Std. . Error|Beta| | t #
#========#===================================#=====#==========#====#=====#
#
|(Constant)
#10.50|
.96| .00|10.96#
#
|Mean time between failures (months)# 3.11|
.09| .99|33.39#
#
|
#
|
|
|
#
#========#===================================#=====#==========#====#=====#
2.3(2) REGRESSION. . Coefficients
#============================================#============#
#
#Significance#
#========#===================================#============#
#
|(Constant)
#
.06#
#
|Mean time between failures (months)#
.00#
#
|
#
#
#========#===================================#============#

Example5.7: Linearregressionanalysistoﬁndapredictorformttr. Theﬁrstattempt,
includingduty
cycle, produces s some unacceptable highsigniﬁcancevalues. . Howeverthe
second attempt, which excludes duty
cycle, produces signiﬁcance values s no higher r than
0.06.Thissuggeststhatmtbf alonemaybeasuitablepredictorformttr.
C# PDF insert image Library: insert images into PDF in C#.net, ASP
How to insert and add image, picture, digital photo, scanned signature or logo into PDF document page in C#.NET class application?
add page numbers to pdf online; add page number to pdf online
VB.NET PDF File Compress Library: Compress reduce PDF size in vb.
Remove bookmarks, annotations, watermark, page labels and article threads from PDF while compressing. Also a preview component enables compressing and
add page numbers pdf; add page number pdf file
Chapter5:Usingpspp
27
Thecoeﬃcientsintheﬁrsttablesuggestthattheformulamttr=9:81+3:1mtbf +
1:09duty
cyclecanbeusedtopredictthetimetorepair.However,thesigniﬁcancevalue
fortheduty
cyclecoeﬃcientisveryhigh,whichwouldmakethisanunsafepredictor.For
this reason,the testwas repeated,butomitting the duty
cycle variable. . This s time, , the
signiﬁcance ofallcoeﬃcients no higher than0.06, suggesting that at the 0.06level, the
formulamttr=10:5+3:11mtbf isareliablepredictorofthetimetorepair.
VB.NET PDF insert image library: insert images into PDF in vb.net
inserting image to PDF in preview without adobe provide users the most individualized PDF page image inserting function, allowing developers to add and insert
adding page numbers to pdf document; add page to existing pdf file
How to C#: Preview Document Content Using XDoc.excel
you with APIs to get a thumbnail bitmap of the first page in the C# DLLs: Preview Excel Document without Microsoft Office Installed. Add necessary references:
adding page numbers pdf; add page to pdf in preview
Chapter6:Thepspplanguage
28
6 Thepspplanguage
This chapter r discusses s elements common n tomany y psppcommands. . Later r chapters will
describeindividualcommandsindetail.
6.1 Tokens
psppdividesmostsyntaxﬁlelinesintoseriesofshortchunkscalledtokens.Tokensarethen
groupedtoformcommands,eachofwhichtells pspptotake someaction—readindata,
writeoutdata,performastatisticalprocedure,etc. Eachtypeoftokenisdescribedbelow.
Identiﬁers Identiﬁers s are names that typically specify variables, , commands,or r subcom-
mands. Theﬁrstcharacter r inanidentiﬁermustbea letter,‘#’,or‘@’. . The
remainingcharactersintheidentiﬁermustbeletters,digits,oroneofthefol-
lowingspecialcharacters:
. _ _ \$ \$ # @
Identiﬁersmaybeanylength,butonlytheﬁrst64bytesaresigniﬁcant. Iden-
tiﬁersarenotcase-sensitive: foobar,Foobar,FooBar,FOOBAR,andFoObaRare
diﬀerentrepresentationsofthesameidentiﬁer.
Someidentiﬁersarereserved.Reservedidentiﬁersmaynotbeusedinanycon-
textbesidesthoseexplicitlydescribedinthismanual. Thereservedidentiﬁers
are:
ALL AND D BY Y EQ GE GT LE LT NE NOT OR TO WITH
Keywords Keywordsareasubclassofidentiﬁersthatformaﬁxedpartofcommandsyntax.
Forexample,commandandsubcommandnamesarekeywords.Keywordsmay
beabbreviatedtotheirﬁrst3characters ifthisabbreviationisunambiguous.
(Uniqueabbreviationsof3ormorecharactersarealsoaccepted:‘FRE’,‘FREQ’,
and‘FREQUENCIES’areequivalentwhenthelastisakeyword.)
Reservedidentiﬁersarealwaysusedaskeywords.Otheridentiﬁersmaybeused
bothaskeywordsandasuser-deﬁnedidentiﬁers,suchasvariablenames.
Numbers Numbersareexpressedindecimal. . Adecimalpointisoptional.Numbersmay
beexpressedinscientiﬁcnotationbyadding‘e’andabase-10exponent,sothat
‘1.234e3’hasthevalue1234.Herearesomemoreexamplesofvalidnumbers:
-5 3.14159265359 1e100 -.707 8945.
Negativenumbersareexpressedwitha‘-’preﬁx.However,insituationswhere
aliteral‘-’tokenisexpected,whatappearstobeanegativenumberistreated
as‘-’followedbyapositivenumber.
Nowhitespaceisallowedwithinanumbertoken,exceptforhorizontalwhite
spacebetween‘-’andtherestofthenumber.
Thelastexampleabove,‘8945.’willbeinterpretedastwotokens,‘8945’and
‘.’,ifit is s the last token n on a line. . See Section6.2 [Formingcommands of
tokens],page29.
Strings
Stringsareliteralsequencesofcharactersenclosedinpairsofsinglequotes(‘’’)
ordoublequotes(‘"’). Toincludethecharacterusedforquotinginthestring,
C# PDF insert text Library: insert text into PDF content in C#.net
Able to add a single text character and text string formatted text and plain text to PDF page using .NET Supports adding text to PDF in preview without adobe
adding page numbers to pdf; adding pages to a pdf
Chapter6:Thepspplanguage
29
double it,e.g.‘’it’’sanapostrophe’’. . Whitespace e andcaseoflettersare
signiﬁcantinsidestrings.
Stringscanbeconcatenatedusing‘+’,sothat‘"a"+’b’+’c’’is equivalent
to‘’abc’’. Sothatalongstringmaybebrokenacrosslines,alinebreakmay
precedeorfollow, or r bothprecede andfollow,the‘+’. . (However,anentirely
blank line preceding or following the ‘+’is interpretedasending the current
command.)
Strings may y also o be expressed as hexadecimal character r values by y preﬁxing
theinitial quote character r by ‘x’or ‘X’. . Regardless s of the syntax ﬁle or ac-
tivedataset’sencoding,thehexadecimaldigitsinthestringareinterpretedas
UnicodecharactersinUTF-8encoding.
IndividualUnicode codepoints mayalsobeexpressedbyspecifying thehex-
adecimalcodepointnumberinsingleordoublequotesprecededby‘u’or‘U’.
Forexample,UnicodecodepointU+1D11E,themusicalGclefcharacter,could
beexpressedasU’1D11E’. InvalidUnicodecodepoints(aboveU+10FFFFor
inbetweenU+D800andU+DFFF)arenotallowed.
When strings are concatenated with ‘+’, each segment’s s preﬁx is considered
individually.Forexample,’TheGclefsymbolis:’+u"1d11e"+"."inserts
aGclefsymbolinthemiddleofanotherwiseplaintextstring.
PunctuatorsandOperators
Thesetokensarethepunctuatorsandoperators:
, / / = ( ) ) + + - * / / ** < < <= <> > > > >= ~= & | .
Most of these appear r within n the e syntax of f commands, , but t the e period d (‘.’)
punctuator isusedonlyat theendofacommand. . Itis s apunctuatoronly as
thelastcharacteronaline(exceptwhitespace). Whenitisthelastnon-space
characteronaline,aperiodisnottreatedaspartofanothertoken,evenifit
wouldotherwisebepartof,e.g.,anidentiﬁeroraﬂoating-pointnumber.
6.2 Formingcommandsoftokens
Most pspp p commands s share acommonstructure. . Acommand d begins s with h acommand
name,suchas FREQUENCIES,DATALIST,orNOFCASES. . Thecommandnamemaybeab-
breviatedtoitsﬁrstword,andeachwordinthecommandnamemaybeabbreviatedtoits
ﬁrstthreeormorecharacters,wheretheseabbreviationsareunambiguous.
Thecommandnamemaybefollowedbyoneormoresubcommands. Eachsubcommand
beginswithasubcommandname,whichmaybeabbreviatedtoitsﬁrstthreeletters. Some
subcommandsacceptaseriesofoneormorespeciﬁcations,whichfollowthesubcommand
name,optionallyseparatedfromitbyanequalssign(‘=’).Speciﬁcationsmaybeseparated
fromeachotherbycommasorspaces.Eachsubcommandmustbeseparatedfromthenext
(ifany)byaforwardslash(‘/’).
Therearemultiplewaystomarktheendofacommand. Themostcommonwayisto
endthelastline ofthecommandwithaperiod(‘.’)asdescribedintheprevioussection
(seeSection6.1[Tokens],page28). Ablankline,oronethatconsistsonlyofwhitespace
orcomments,alsoendsacommand.
Chapter6:Thepspplanguage
30
6.3 SyntaxVariants
Therearethreevariantsofcommandsyntax,whichvaryonlyinhowtheydetecttheend
ofonecommandandthestartofthenext.
In interactive mode, which is s thedefault for syntax typedat a command d prompt, a
periodasthelastnon-blankcharacteronalineendsacommand.Ablanklinealsoendsa
command.
Inbatchmode,anend-of-lineperiodorablanklinealsoendsacommand. Additionally,
ittreatsanylinethathasanon-blankcharacterintheleftmostcolumnasbeginninganew
command. Thus,inbatchmodethesecondandsubsequentlinesinacommandmust t be
indented.
Regardlessofthesyntaxmode,aplussign,minussign,orperiodintheleftmostcolumn
ofalineisignoredandcausesthatlinetobeginanewcommand. This s ismostusefulin
batchmode,inwhichtheﬁrstlineofanewcommandcouldnototherwisebeindented,but
itisacceptedregardlessofsyntaxmode.
The defaultmode for reading commands from aﬁle is auto mode. . It t is the same as
batchmode,exceptthatalinewithanon-blankintheleftmostcolumnonlystartsanew
commandifthatlinebeginswiththenameofapsppcommand. Thiscorrectlyinterprets
mostvalidpsppsyntaxﬁlesregardlessofthesyntaxmodeforwhichtheyareintended.
The --interactive(or -i) or --batch(or -b) options set thesyntax modeforﬁles
listedonthepsppcommandline.SeeSection3.1[MainOptions],page4,formoredetails.
6.4 TypesofCommands
Commandsinpspparedividedroughlyintosixcategories:
Utilitycommands
Setordisplayvariousglobaloptionsthataﬀectpsppoperations. Mayappear
anywhereinasyntaxﬁle.SeeChapter16[Utilitycommands],page156.
Filedeﬁnitioncommands
Giveinstructionsforreadingdatafromtextﬁlesorfromspecialbinary“system
ﬁles”. Mostofthesecommandsreplaceanypreviousdataorvariableswithnew
dataorvariables.Atleastoneﬁledeﬁnitioncommandmustappearbeforethe
ﬁrstcommandinanyofthecategoriesbelow. SeeChapter8[DataInputand
Output],page64.
Inputprogramcommands
Thoughrarelyused,theseprovidetoolsforreadingdataﬁlesinarbitrarytextual
orbinaryformats. SeeSection8.9[INPUTPROGRAM],page73.
Transformations
Performoperationsondataandwritedatatooutputﬁles.Transformationsare
notcarriedoutuntilaprocedureisexecuted.
Restrictedtransformations
Transformationsthatcannotappearincertaincontexts.SeeSection6.5[Order
ofCommands],page31,fordetails.
Chapter6:Thepspplanguage
31
Procedures
Analyzedata,writingresultsofanalysestothelistingﬁle. Causetransforma-
tionsspeciﬁedearlier inthe ﬁletobe performed. . Inamore e generalsense,a
procedureisanycommandthatcausestheactivedataset(thedata)toberead.
6.5 OrderofCommands
psppdoesnotplacemanyrestrictionsonorderingofcommands. Themainrestrictionis
thatvariablesmustbedeﬁnedbeforetheyareotherwisereferenced. Thissectiondescribes
thedetailsofcommandordering,butmostuserswillhavenoneedtorefertothem.
pspppossessesﬁveinternalstates,calledinitial,input-programﬁle-type,transformation,
andprocedure states. . (PleasenotethedistinctionbetweentheINPUTPROGRAMandFILE
TYPEcommandsandtheinput-programandﬁle-typestates.)
psppstartsintheinitialstate. Eachsuccessfulcompletionofacommandmaycausea
statetransition. Eachtypeofcommandhasitsownrulesforstatetransitions:
Utilitycommands
 Validinanystate.
 Donotcausestatetransitions.Exception:whenNOFCASESisexecutedin
theprocedurestate,itcausesatransitiontothetransformationstate.
DATALIST
 Validinanystate.
 Whenexecutedintheinitialorprocedurestate,causesatransitiontothe
transformationstate.
 Clearsthe e active dataset if executedinthe procedureortransformation
state.
INPUTPROGRAM
 Invalidininput-programandﬁle-typestates.
 Causesatransitiontotheintput-programstate.
 Clearstheactivedataset.
FILETYPE
 Invalidinintput-programandﬁle-typestates.
 Causesatransitiontotheﬁle-typestate.
 Clearstheactivedataset.
Otherﬁledeﬁnitioncommands
 Invalidininput-programandﬁle-typestates.
 Causeatransitiontothetransformationstate.
 Cleartheactivedataset,exceptforADDFILES,MATCHFILES,andUPDATE.
Transformations
 Invalidininitialandﬁle-typestates.
 Causeatransitiontothetransformationstate.
Restrictedtransformations
 Invalidininitial,input-program,andﬁle-typestates.