2019.11.14 spss notes in class Yang Xin Rui


Simulation of a random variable

   'uniform' random number

         to open the data file of the chapter 'sim.sav'

       1. Set random seed

          selection (conversion) → (random number generator), "set the starting point 'and' fixed value ' 'value 1' at a user entered given value

        2. generates uniformly distributed random numbers

to select a [conversion] [calculated] variable, the target variable input variable in the box "Spinn", in the "numeric expression ( E) '' input box "TRUNC (RVUNIEORM (1,5)) "

         nature of the random numbers generated by the analysis.

          [A] Description statistical analysis a] [frequency], then the variable "Spinn" selection "variable (V)" box

          click graph (C) button, and obtain a "frequency shown in FIG. 4-5: chart "dialog box, check the" histogram (H) "option.

      Normally distributed random number

         provided as the random number seed '123456', and to open a data file of the chapter 'sim.sav'

         and select [Conversion) a [calculated variables), calculated variables dialog box to set the target variable 'Rnorm01 ', in the "numeric expression (E)" input section "RVNorma (0.1)"

        stored in the random number distribution of the file is "Sim norm.say" Here we observe generated. first, FIG drawing generated sequence of random numbers select [graphics (G)] [a graph builder (C)], in the "selection range (C)" "library" tab

Select the "bar" on the right side of the template and then double-bar (a first pattern template), the "Rnomno to drag and drop variables y axis canvas," XID "grab onto the x-axis variable is then set element property. list box, select "edit about object properties" box, select "statistic (S)" 'bar' statistics section of "value (V), and then click [application] and [Close] button . Return "Chart Builder" window. Finally, click OK button to get a bar graph of random variables.

    The sample data is indeed generally normally distributed from randomly selected

    1. Select [graphics (G)] a [Chart Builder (C], in the "Library" tag "choice" Select "histogram (H ) ", the" Rnomm01 "drag and drop on the horizontal axis. then, in the element properties dialog box, check box in which" displays the normal curve (N)

theoretical distribution

  distribution function of the binomial probability and

    if randomized trial only two possible outcomes, called worthwhile success and failure, the probability of success of this experiment is provided to p (0 <p <1) . If the experiment independent independent experiments repeated n times, which a repeated sequence of n-fold referred Bernoulli experiment.

    1. the distribution function

      (1)] → select file (data New [→]), opens an empty data file in the data editor in the input data in the first column are 0.1 views . .2.3, ..., 10 that is, all possible values of the random variable X

     (2) click the view variable variable name "VAR00001" changed to "x", number of decimal places to 0; the establishment of two additional new variable, named "c25" and "c40", decimal places are set 4.

      (3) Sets the random number seed is "123456". Then select a. {Converter input (T)] [calculation of the variable (C)] in the "calculation of the variable" dialog "target variable (T)" box people "c25", "digital expression (E)" box, enter people "CDEBINQM (the X-, 10.0.25)"

    2. probability distribution function

     Select [Conversion (T)] [calculation of a variable (C)] in the "calculation of change" dialog "target variable (T)" input box "prnb25", in the "Numeric Expression (E" box, enter " c25-lag (c25) "

    double clicking on the graphic editor window, property window can appear in the properties window, the bar may be provided various properties, such as width, fill color, border, graphic size

Guess you like

Origin www.cnblogs.com/yangxinrui123456/p/11861044.html