Fu Chen Yao spss 2019.11.14

Simulation of random variables

   'Uniform' random numbers

         Open the data file chapter 'sim.sav'

       1. Set a random number seed

          Selection (conversion) → (random number generator), "set the starting point 'and' user enter a given numerical value fixed 'under' of

        2. generating uniformly distributed random numbers

Select [] Conversion [a] calculated variables, input variables box name "Spinn" target variable, " 'Digital input box expression (E)" TRUNC (RVUNIEORM (1,5)) "

         Analytical properties of the random numbers generated.

          [Analysis] a [statistical] a description [frequency], then the variable "Spinn" selection "variable (V)" box

          Click the chart (C)] button, as shown in Figure 4-5 to get "frequency: Chart" dialog box, check the "histogram (H)" option.

      Normally distributed random numbers

         Set random seed "123456 '' and will open the data file 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)"

        Save the distribution of the random number 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 the horizontal axis [Chart Builder (C], "selection range", select "histogram (H)" in the "Library" tab, the "Rnomm01" Drop [graphics (G)] a. Then in element properties dialog box, check box in which "displays the normal curve (N)

Theoretical distribution

  Binomial probability distribution function and

    If the random trials only two possible outcomes, called worthwhile success and failure, it is assumed that the probability of a successful experiment is p (0 <p <1). If the experiment is repeated independently for n times, which is a repeated sequence the weight of n independent experiments called Bernoulli experiment.

    1. Distribution Function

      (1)] → Select File (data New [→]), opens an empty data file in the data editor in the first column of the input view data are 0.1.2.3, ..., 10. I.e. the random variable X all possible values

     (2) Click the View variable variable name "VAR00001" changed to "x", number of decimal places to 0; build another two new variables, named "c25" and "c40", all decimal places set 4.

      (3) Set random seed is "123456." Then select {converter (T)} [a calculated variable (C)]. In the "calculation of the variable" dialog "target variable (T)" input box "c25", in the "Numeric Expression (E)" people box, enter "CDEBINQM (x, 10.0.25)"

    2. The 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-click the graphics editor window graphics, window properties can occur. 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/chenfuyao001/p/11861043.html